-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile.am
888 lines (846 loc) · 27.8 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
AM_CPPFLAGS = @NEOPZINCL@ @DAKOTAINCL@ @SHAPELIBINCL@ @TRIANGLEINCL@ @PETSCINCL@ @AMPIINCL@ @ADJOINTMPIINCL@ @MEDIPACKINCL@ @MPIINCL@ @PARMETISINCL@ @METISINCL@ @CHACOINCL@ @SCOTCHINCL@ @PLAPACKINCL@ @MKLINCL@ @MUMPSINCL@ @SPAIINCL@ @HYPREINCL@ @PROMETHEUSINCL@ @SUPERLUINCL@ @SPOOLESINCL@ @PASTIXINCL@ @MLINCL@ @TAOINCL@ @ADOLCINCL@ @CODIPACKINCL@ @GSLINCL@ @BOOSTINCL@ @METEOIOINCL@ @SNOWPACKINCL@ @PROJINCL@ @ESMFINCL@ @PROJINCL@ @MPLAPACKINCL@
AM_FCFLAGS = @SEMICINCL@
AUTOMAKE_OPTIONS = subdir-objects
EXEEXT=$(ISSMEXT)
# Library declaration {{{
lib_LTLIBRARIES = libISSMCore.la
if !MSYS2
lib_LTLIBRARIES += libISSMOverload.la
endif
if WRAPPERS
lib_LTLIBRARIES += libISSMModules.la
endif
#}}}
# Core sources
issm_sources =
# BAMG sources {{{
if BAMG
issm_sources += \
./bamg/BamgGeom.cpp \
./bamg/BamgMesh.cpp \
./bamg/BamgOpts.cpp \
./bamg/CrackedEdge.cpp \
./bamg/Curve.cpp \
./bamg/Edge.cpp \
./bamg/GeomEdge.cpp \
./bamg/GeomSubDomain.cpp \
./bamg/GeomVertex.cpp \
./bamg/Geometry.cpp \
./bamg/ListofIntersectionTriangles.cpp \
./bamg/EigenMetric.cpp \
./bamg/Metric.cpp \
./bamg/BamgQuadtree.cpp \
./bamg/SetOfE4.cpp \
./bamg/SubDomain.cpp \
./bamg/AdjacentTriangle.cpp \
./bamg/Triangle.cpp \
./bamg/BamgVertex.cpp \
./bamg/VertexOnEdge.cpp \
./bamg/VertexOnGeom.cpp \
./bamg/VertexOnVertex.cpp \
./bamg/Mesh.cpp \
./shared/Bamg/BigPrimeNumber.cpp \
./modules/Bamgx/Bamgx.cpp \
./modules/BamgConvertMeshx/BamgConvertMeshx.cpp \
./modules/BamgTriangulatex/BamgTriangulatex.cpp
# Do not include AmrBamg with AD
if ADOLC
issm_sources += \
./shared/Numerics/isnan.cpp \
./shared/MemOps/MemOps.cpp
else
if CODIPACK
issm_sources += ./shared/Numerics/isnan.cpp
else
issm_sources += ./classes/AmrBamg.cpp
endif
endif
endif
#}}}
# Core sources {{{
issm_sources += \
./datastructures/DataSet.cpp \
./classes/gauss/GaussSeg.cpp \
./classes/gauss/GaussTria.cpp \
./classes/gauss/GaussTetra.cpp \
./classes/gauss/GaussPenta.cpp \
./classes/IoModel.cpp \
./classes/FemModel.cpp \
./classes/Loads/Friction.cpp \
./classes/Constraints/SpcTransient.cpp \
./classes/DependentObject.cpp \
./classes/Contours.cpp \
./classes/Vertices.cpp \
./classes/Nodes.cpp \
./classes/Numberedcostfunction.cpp \
./classes/Misfit.cpp \
./classes/Cfsurfacesquare.cpp \
./classes/Cfsurfacesquaretransient.cpp \
./classes/Cfdragcoeffabsgrad.cpp \
./classes/Cfdragcoeffabsgradtransient.cpp \
./classes/Cfrheologybbarabsgrad.cpp \
./classes/Cfrheologybbarabsgradtransient.cpp \
./classes/Cfsurfacelogvel.cpp \
./classes/Cflevelsetmisfit.cpp \
./classes/Regionaloutput.cpp \
./classes/Nodalvalue.cpp \
./classes/Node.cpp \
./classes/Vertex.cpp \
./classes/Hook.cpp \
./classes/Radar.cpp \
./classes/BarystaticContributions.cpp \
./classes/ExternalResults/Results.cpp \
./classes/Elements/Element.cpp \
./classes/Elements/Elements.cpp \
./classes/Elements/ElementHook.cpp \
./classes/Elements/Seg.cpp \
./classes/Elements/SegRef.cpp \
./classes/Elements/Tria.cpp \
./classes/Elements/TriaRef.cpp \
./classes/Elements/Tetra.cpp \
./classes/Elements/TetraRef.cpp \
./classes/Elements/Penta.cpp \
./classes/Elements/PentaRef.cpp \
./classes/Materials/Materials.cpp \
./classes/Materials/Matice.cpp \
./classes/Materials/Matlitho.cpp \
./classes/Materials/Matestar.cpp \
./classes/Constraints/Constraints.cpp \
./classes/Constraints/SpcStatic.cpp \
./classes/Constraints/SpcDynamic.cpp \
./classes/Loads/Channel.cpp \
./classes/Loads/Loads.cpp \
./classes/Loads/Penpair.cpp \
./classes/Loads/Pengrid.cpp \
./classes/Loads/Moulin.cpp \
./classes/Loads/Numericalflux.cpp \
./classes/Loads/Neumannflux.cpp \
./classes/matrix/ElementMatrix.cpp \
./classes/matrix/ElementVector.cpp \
./classes/Params/Parameters.cpp \
./classes/Params/BoolParam.cpp \
./classes/Params/ControlParam.cpp \
./classes/Params/IntParam.cpp \
./classes/Params/IntVecParam.cpp \
./classes/Params/IntMatParam.cpp \
./classes/Params/DoubleParam.cpp \
./classes/Params/FileParam.cpp \
./classes/Params/StringArrayParam.cpp \
./classes/Params/DoubleMatParam.cpp \
./classes/Params/DoubleTransientMatParam.cpp \
./classes/Params/DoubleMatArrayParam.cpp \
./classes/Params/DoubleVecParam.cpp \
./classes/Params/StringParam.cpp \
./classes/Params/MatrixParam.cpp \
./classes/Params/VectorParam.cpp \
./classes/Params/TransientParam.cpp \
./classes/Params/TransientArrayParam.cpp \
./classes/Params/DataSetParam.cpp \
./classes/Profiler.cpp \
./shared/Matrix/MatrixUtils.cpp \
./shared/io/Disk/pfopen.cpp \
./shared/io/Disk/pfclose.cpp \
./shared/io/Disk/WriteLockFile.cpp \
./shared/io/Print/PrintfFunction.cpp \
./shared/io/Comm/IssmComm.cpp \
./shared/io/Marshalling/IoCodeConversions.cpp \
./shared/io/Marshalling/Marshalling.cpp \
./shared/LatLong/Ll2xyx.cpp \
./shared/LatLong/Xy2llx.cpp \
./shared/FSanalyticals/fsanalyticals.cpp \
./shared/Enum/EnumToStringx.cpp \
./shared/Enum/StringToEnumx.cpp \
./shared/Numerics/Verbosity.cpp \
./shared/Numerics/GaussPoints.cpp \
./shared/Numerics/cross.cpp \
./shared/Numerics/cubic.cpp \
./shared/Numerics/NewtonSolveDnorm.cpp \
./shared/Numerics/ODE1.cpp \
./shared/Numerics/extrema.cpp \
./shared/Numerics/legendre.cpp \
./shared/Numerics/XZvectorsToCoordinateSystem.cpp \
./shared/Exceptions/Exceptions.cpp \
./shared/Sorting/binary_search.cpp \
./shared/Elements/Cuffey.cpp \
./shared/Elements/BuddJacka.cpp \
./shared/Elements/CuffeyTemperate.cpp \
./shared/Elements/StressIntensityIntegralWeight.cpp \
./shared/Elements/Paterson.cpp \
./shared/Elements/Arrhenius.cpp \
./shared/Elements/NyeCO2.cpp \
./shared/Elements/NyeH2O.cpp \
./shared/Elements/LliboutryDuval.cpp \
./shared/Elements/PrintArrays.cpp \
./shared/Elements/PddSurfaceMassBalance.cpp \
./shared/Elements/PddSurfaceMassBalanceSicopolis.cpp \
./shared/Elements/ComputeDelta18oTemperaturePrecipitation.cpp \
./shared/Elements/ComputeMungsmTemperaturePrecipitation.cpp \
./shared/Elements/ComputeD18OTemperaturePrecipitationFromPD.cpp \
./shared/Elements/DrainageFunctionWaterfraction.cpp \
./shared/Elements/EstarComponents.cpp \
./shared/Random/random.cpp \
./shared/Random/randomgenerator.cpp \
./shared/String/DescriptorIndex.cpp \
./toolkits/issm/IssmToolkitUtils.cpp \
./toolkits/issm/IssmSolver.cpp \
./toolkits/mpi/issmmpi.cpp \
./toolkits/mpi/commops/DetermineLocalSize.cpp \
./toolkits/mpi/commops/DetermineGlobalSize.cpp \
./toolkits/mpi/commops/DetermineRowRankFromLocalSize.cpp \
./toolkits/mpi/commops/GetOwnershipBoundariesFromRange.cpp \
./toolkits/ToolkitOptions.cpp \
./modules/MmeToInputFromIdx/MmeToInputFromIdx.cpp\
./modules/ModelProcessorx/ModelProcessorx.cpp \
./modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp \
./modules/ModelProcessorx/NodesPartitioning.cpp \
./modules/ModelProcessorx/EdgesPartitioning.cpp \
./modules/ModelProcessorx/FacesPartitioning.cpp \
./modules/ModelProcessorx/CreateParameters.cpp \
./modules/ModelProcessorx/Autodiff/CreateParametersAutodiff.cpp \
./modules/ModelProcessorx/CreateFaces.cpp \
./modules/ModelProcessorx/CreateEdges.cpp \
./modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp \
./modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp \
./modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp \
./modules/ModelProcessorx/CreateNodes.cpp \
./modules/ParseToolkitsOptionsx/ParseToolkitsOptionsx.cpp \
./modules/NodesDofx/NodesDofx.cpp \
./modules/NodalValuex/NodalValuex.cpp \
./modules/VertexCoordinatesx/VertexCoordinatesx.cpp \
./modules/ElementCoordinatesx/ElementCoordinatesx.cpp \
./modules/OutputResultsx/OutputResultsx.cpp \
./modules/InputDepthAverageAtBasex/InputDepthAverageAtBasex.cpp \
./modules/InputDuplicatex/InputDuplicatex.cpp \
./modules/InputExtrudex/InputExtrudex.cpp \
./modules/SurfaceAreax/SurfaceAreax.cpp \
./modules/AllocateSystemMatricesx/AllocateSystemMatricesx.cpp \
./modules/CreateJacobianMatrixx/CreateJacobianMatrixx.cpp \
./modules/SystemMatricesx/SystemMatricesx.cpp \
./modules/CreateNodalConstraintsx/CreateNodalConstraintsx.cpp \
./modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp \
./modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp \
./modules/SetActiveNodesLSMx/SetActiveNodesLSMx.cpp \
./modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp \
./modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp \
./modules/GeothermalFluxx/GeothermalFluxx.cpp \
./modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp \
./modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp \
./modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp \
./modules/FloatingiceMeltingRatex/FloatingiceMeltingRatex.cpp \
./modules/FloatingiceMeltingRatePicox/FloatingiceMeltingRatePicox.cpp \
./modules/FrontalForcingsx/FrontalForcingsx.cpp \
./modules/ConfigureObjectsx/ConfigureObjectsx.cpp \
./modules/SpcNodesx/SpcNodesx.cpp \
./modules/SurfaceMassBalancex/SurfaceMassBalancex.cpp \
./modules/SurfaceMassBalancex/Gembx.cpp \
./modules/Reducevectorgtofx/Reducevectorgtofx.cpp \
./modules/Reduceloadx/Reduceloadx.cpp \
./modules/ConstraintsStatex/ConstraintsStatex.cpp \
./modules/ResetConstraintsx/ResetConstraintsx.cpp \
./modules/ResetFSBasalBoundaryConditionx/ResetFSBasalBoundaryConditionx.cpp \
./modules/Solverx/Solverx.cpp \
./modules/StochasticForcingx/StochasticForcingx.cpp \
./modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp \
./cores/ProcessArguments.cpp \
./cores/ResetBoundaryConditions.cpp \
./cores/WrapperCorePointerFromSolutionEnum.cpp \
./cores/WrapperPreCorePointerFromSolutionEnum.cpp \
./cores/CorePointerFromSolutionEnum.cpp \
./cores/ad_core.cpp \
./main/EnvironmentInit.cpp \
./main/EnvironmentFinalize.cpp \
./analyses/EnumToAnalysis.cpp \
./solutionsequences/solutionsequence_la.cpp \
./solutionsequences/solutionsequence_la_theta.cpp \
./solutionsequences/solutionsequence_linear.cpp \
./solutionsequences/solutionsequence_nonlinear.cpp \
./solutionsequences/solutionsequence_newton.cpp \
./solutionsequences/solutionsequence_fct.cpp \
./solutionsequences/solutionsequence_schurcg.cpp \
./solutionsequences/solutionsequence_sampling.cpp \
./solutionsequences/convergence.cpp \
./classes/Options/Options.cpp \
./classes/Options/OptionUtilities.cpp \
./classes/RiftStruct.cpp \
./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp \
./modules/ModelProcessorx/Transient/UpdateParametersTransient.cpp \
./cores/transient_core.cpp \
./cores/steadystate_core.cpp \
./cores/masstransport_core.cpp \
./cores/oceantransport_core.cpp \
./cores/depthaverage_core.cpp \
./cores/extrudefrombase_core.cpp \
./cores/extrudefromtop_core.cpp \
./cores/thermal_core.cpp \
./cores/smb_core.cpp \
./cores/bmb_core.cpp \
./cores/debris_core.cpp \
./solutionsequences/solutionsequence_thermal_nonlinear.cpp \
./modules/ControlInputSetGradientx/ControlInputSetGradientx.cpp \
./modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.cpp \
./modules/SetControlInputsFromVectorx/SetControlInputsFromVectorx.cpp \
./modules/ModelProcessorx/Control/CreateParametersControl.cpp \
./modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp \
./modules/SurfaceAbsVelMisfitx/SurfaceAbsVelMisfitx.cpp \
./modules/SurfaceRelVelMisfitx/SurfaceRelVelMisfitx.cpp \
./modules/SurfaceLogVelMisfitx/SurfaceLogVelMisfitx.cpp \
./modules/SurfaceLogVxVyMisfitx/SurfaceLogVxVyMisfitx.cpp \
./modules/SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.cpp \
./modules/ThicknessAbsMisfitx/ThicknessAbsMisfitx.cpp \
./modules/Gradjx/Gradjx.cpp \
./modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.cpp \
./modules/ThicknessAlongGradientx/ThicknessAlongGradientx.cpp \
./modules/ThicknessAcrossGradientx/ThicknessAcrossGradientx.cpp \
./modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.cpp \
./modules/RheologyBAbsGradientx/RheologyBAbsGradientx.cpp \
./shared/Numerics/BrentSearch.cpp \
./cores/control_core.cpp \
./cores/controltao_core.cpp \
./cores/controlm1qn3_core.cpp \
./cores/controladm1qn3_core.cpp \
./cores/controlvalidation_core.cpp \
./cores/adjointstressbalance_core.cpp \
./cores/adjointbalancethickness_core.cpp \
./cores/adjointbalancethickness2_core.cpp \
./cores/AdjointCorePointerFromSolutionEnum.cpp \
./solutionsequences/solutionsequence_adjoint_linear.cpp \
./cores/hydrology_core.cpp \
./solutionsequences/solutionsequence_hydro_nonlinear.cpp \
./solutionsequences/solutionsequence_shakti_nonlinear.cpp \
./solutionsequences/solutionsequence_glads_nonlinear.cpp \
./cores/stressbalance_core.cpp \
./solutionsequences/solutionsequence_stokescoupling_nonlinear.cpp \
./cores/balancethickness_core.cpp \
./cores/balancethickness2_core.cpp \
./cores/balancevelocity_core.cpp \
./cores/dummy_core.cpp \
./cores/surfaceslope_core.cpp \
./cores/bedslope_core.cpp \
./cores/damage_core.cpp \
./cores/levelsetfunctionslope_core.cpp \
./cores/movingfront_core.cpp \
./cores/groundingline_core.cpp \
./modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp \
./classes/Loads/Riftfront.cpp \
./modules/ConstraintsStatex/RiftConstraintsState.cpp \
./modules/ModelProcessorx/CreateOutputDefinitions.cpp \
./modules/OutputDefinitionsResponsex/OutputDefinitionsResponsex.cpp \
./modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp \
./classes/Inputs/Inputs.cpp \
./classes/Inputs/BoolInput.cpp \
./classes/Inputs/DoubleInput.cpp \
./classes/Inputs/IntInput.cpp \
./classes/Inputs/ElementInput.cpp \
./classes/Inputs/SegInput.cpp \
./classes/Inputs/TriaInput.cpp \
./classes/Inputs/PentaInput.cpp \
./classes/Inputs/DatasetInput.cpp \
./classes/Inputs/ControlInput.cpp \
./classes/Inputs/TransientInput.cpp \
./classes/Inputs/ArrayInput.cpp \
./classes/Inputs/IntArrayInput.cpp
#}}}
# ADJOINTMPI/MeDiPack sources {{{
if ADJOINTMPI
issm_sources += ./toolkits/codipack/ampi_interface.cpp
endif
if MEDIPACK
issm_sources += ./toolkits/codipack/ampi_interface.cpp
endif
if CODIPACK
issm_sources += ./toolkits/codipack/CoDiPackGlobal.cpp
endif
#}}}
# DAKOTA sources {{{
if DAKOTA
issm_sources += \
./classes/Dakota/IssmDirectApplicInterface.h \
./classes/Dakota/IssmParallelDirectApplicInterface.cpp \
./modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp \
./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp \
./modules/InputUpdateFromMatrixDakotax/InputUpdateFromMatrixDakotax.cpp \
./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp \
./modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp \
./modules/ModelProcessorx/Dakota/UpdateElementsAndMaterialsDakota.cpp \
./cores/dakota_core.cpp
if SYSTEM_HAS_FMEMOPEN
issm_sources += ./modules/QmuStatisticsx/QmuStatisticsx.cpp
endif
endif
#}}}
# PETSc sources {{{
if PETSC
issm_sources += \
./toolkits/petsc \
./toolkits/petsc/patches \
./toolkits/petsc/patches/VecToMPISerial.cpp \
./toolkits/petsc/patches/MatToMPISerial.cpp \
./toolkits/petsc/patches/NewVec.cpp \
./toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp \
./toolkits/petsc/patches/NewMat.cpp \
./toolkits/petsc/patches/VecFree.cpp \
./toolkits/petsc/patches/KSPFree.cpp \
./toolkits/petsc/patches/MatFree.cpp \
./toolkits/petsc/patches/MatMultPatch.cpp \
./toolkits/petsc/patches/ISSMToPetscMatrixType.cpp \
./toolkits/petsc/patches/ISSMToPetscInsertMode.cpp \
./toolkits/petsc/patches/ISSMToPetscNormMode.cpp \
./toolkits/petsc/objects/PetscMat.cpp \
./toolkits/petsc/objects/PetscVec.cpp \
./toolkits/petsc/objects/PetscSolver.cpp
endif
#}}}
# MUMPS sources {{{
if MUMPS
issm_sources += ./toolkits/mumps/MumpsSolve.cpp
endif
#}}}
# GSL sources {{{
if GSL
issm_sources += ./toolkits/gsl/DenseGslSolve.cpp
endif
#}}}
# PROJ sources {{{
if PROJ
issm_sources += ./modules/CoordinateSystemTransformx/CoordinateSystemTransformx.cpp
endif
#}}}
# Analyses {{{
if ADJOINTBALANCETHICKNESS
issm_sources += ./analyses/AdjointBalancethicknessAnalysis.cpp
endif
if ADJOINTBALANCETHICKNESS2
issm_sources += ./analyses/AdjointBalancethickness2Analysis.cpp
endif
if ADJOINTHORIZ
issm_sources += ./analyses/AdjointHorizAnalysis.cpp
endif
if AGE
issm_sources += ./analyses/AgeAnalysis.cpp
endif
if BALANCETHICKNESS
issm_sources += ./analyses/BalancethicknessAnalysis.cpp
endif
if BALANCETHICKNESS2
issm_sources += ./analyses/Balancethickness2Analysis.cpp
endif
if BALANCETHICKNESSSOFT
issm_sources += ./analyses/BalancethicknessSoftAnalysis.cpp
endif
if BALANCEVELOCITY
issm_sources += ./analyses/BalancevelocityAnalysis.cpp
endif
if L2PROJECTIONBASE
issm_sources += ./analyses/L2ProjectionBaseAnalysis.cpp
endif
if DAMAGEEVOLUTION
issm_sources += ./analyses/DamageEvolutionAnalysis.cpp
issm_sources += ./modules/Damagex/Damagex.cpp
endif
if DEBRIS
issm_sources += ./analyses/DebrisAnalysis.cpp
endif
if STRESSBALANCE
issm_sources += ./analyses/StressbalanceAnalysis.cpp
endif
if UZAWAPRESSURE
issm_sources += ./analyses/UzawaPressureAnalysis.cpp
endif
if STRESSBALANCESIA
issm_sources += ./analyses/StressbalanceSIAAnalysis.cpp
endif
if STRESSBALANCEVERTICAL
issm_sources += ./analyses/StressbalanceVerticalAnalysis.cpp
endif
if ENTHALPY
issm_sources += ./analyses/EnthalpyAnalysis.cpp
endif
if GLHEIGHTADVECTION
issm_sources += ./analyses/GLheightadvectionAnalysis.cpp
endif
if HYDROLOGYSHREVE
issm_sources += ./analyses/HydrologyShreveAnalysis.cpp
endif
if HYDROLOGYTWS
issm_sources += ./analyses/HydrologyTwsAnalysis.cpp
endif
if HYDROLOGYSHAKTI
issm_sources += ./analyses/HydrologyShaktiAnalysis.cpp
endif
if HYDROLOGYPISM
issm_sources += ./analyses/HydrologyPismAnalysis.cpp
endif
if HYDROLOGYGLADS
issm_sources += ./analyses/HydrologyGlaDSAnalysis.cpp
endif
if HYDROLOGYDCINEFFICIENT
issm_sources += ./analyses/HydrologyDCInefficientAnalysis.cpp
endif
if HYDROLOGYDCEFFICIENT
issm_sources += ./analyses/HydrologyDCEfficientAnalysis.cpp
endif
if HYDROLOGYARMAPW
issm_sources += ./analyses/HydrologyArmapwAnalysis.cpp
endif
if L2PROJECTIONEPL
issm_sources += ./analyses/L2ProjectionEPLAnalysis.cpp
endif
if MELTING
issm_sources += ./analyses/MeltingAnalysis.cpp
endif
if MASSTRANSPORT
issm_sources += ./analyses/MasstransportAnalysis.cpp
endif
if OCEANTRANSPORT
issm_sources += ./analyses/OceantransportAnalysis.cpp
endif
if SMB
issm_sources += ./analyses/SmbAnalysis.cpp
endif
if FREESURFACEBASE
issm_sources += ./analyses/FreeSurfaceBaseAnalysis.cpp
endif
if FREESURFACETOP
issm_sources += ./analyses/FreeSurfaceTopAnalysis.cpp
endif
if EXTRUDEFROMBASE
issm_sources += ./analyses/ExtrudeFromBaseAnalysis.cpp
endif
if EXTRUDEFROMTOP
issm_sources += ./analyses/ExtrudeFromTopAnalysis.cpp
endif
if DEPTHAVERAGE
issm_sources += ./analyses/DepthAverageAnalysis.cpp
endif
if THERMAL
issm_sources += ./analyses/ThermalAnalysis.cpp
endif
if SMOOTH
issm_sources += ./analyses/SmoothAnalysis.cpp
endif
if LEVELSET
issm_sources += ./analyses/LevelsetAnalysis.cpp
issm_sources += ./modules/Calvingx/Calvingx.cpp
issm_sources += ./modules/KillIcebergsx/KillIcebergsx.cpp
endif
if EXTRAPOLATION
issm_sources += ./analyses/ExtrapolationAnalysis.cpp
endif
#}}}
# Love sources (only if have Fortran) {{{
if LOVE
if FORTRAN
issm_sources += \
./cores/love_core.cpp \
./analyses/LoveAnalysis.cpp
endif
endif
#}}}
# Esa sources {{{
if ESA
issm_sources += \
./cores/esa_core.cpp \
./analyses/EsaAnalysis.cpp
endif
#}}}
# Ocean sources {{{
if OCEAN
issm_sources += ./modules/OceanExchangeDatax/OceanExchangeDatax.cpp
endif
#}}}
# Sampling sources {{{
if SAMPLING
issm_sources += \
./cores/sampling_core.cpp \
./analyses/SamplingAnalysis.cpp
endif
#}}}
# SLC sources {{{
if SEALEVELCHANGE
issm_sources += \
./cores/sealevelchange_core.cpp \
./analyses/SealevelchangeAnalysis.cpp\
./classes/GrdLoads.cpp\
./classes/SealevelGeometry.cpp
# GIA Ivins physics (only if have Fortran)
if FORTRAN
issm_sources += \
./modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp \
./modules/GiaDeflectionCorex/distme.f \
./modules/GiaDeflectionCorex/freed.f \
./modules/GiaDeflectionCorex/ojrule.f \
./modules/GiaDeflectionCorex/pwise.f \
./modules/GiaDeflectionCorex/qwise.f \
./modules/GiaDeflectionCorex/stot.f \
./modules/GiaDeflectionCorex/what0.f
endif
endif
#}}}
# METIS sources {{{
if METIS
issm_sources += ./modules/MeshPartitionx/MeshPartitionx.cpp
issm_sources += ./toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp
endif
#}}}
# Esmf sources {{{
if ESMF
issm_sources += ./main/esmfbinders.cpp
endif
#}}}
# SEMIC sources {{{
if SEMIC
if FORTRAN
issm_sources += ./modules/SurfaceMassBalancex/run_semic.f90
issm_sources += ./modules/SurfaceMassBalancex/run_semic_transient.f90
endif
endif
#}}}
# Wrapper sources
# Kml sources {{{
kml_sources = \
./modules/Exp2Kmlx/Exp2Kmlx.cpp \
./modules/Kml2Expx/Kml2Expx.cpp \
./modules/Shp2Kmlx/Shp2Kmlx.cpp \
./modules/KMLFileReadx/KMLFileReadx.cpp \
./modules/KMLMeshWritex/KMLMeshWritex.cpp \
./modules/KMLOverlayx/KMLOverlayx.cpp \
./kml/KML_Attribute.cpp \
./kml/KML_Comment.cpp \
./kml/KML_ColorStyle.cpp \
./kml/KML_Container.cpp \
./kml/KML_Document.cpp \
./kml/KML_Feature.cpp \
./kml/KML_File.cpp \
./kml/KML_Folder.cpp \
./kml/KML_Geometry.cpp \
./kml/KML_GroundOverlay.cpp \
./kml/KML_Icon.cpp \
./kml/KML_LatLonBox.cpp \
./kml/KML_LinearRing.cpp \
./kml/KML_LineString.cpp \
./kml/KML_LineStyle.cpp \
./kml/KML_MultiGeometry.cpp \
./kml/KML_Object.cpp \
./kml/KML_Overlay.cpp \
./kml/KML_Point.cpp \
./kml/KML_Placemark.cpp \
./kml/KML_Polygon.cpp \
./kml/KML_PolyStyle.cpp \
./kml/KML_Style.cpp \
./kml/KML_StyleSelector.cpp \
./kml/KML_SubStyle.cpp \
./kml/KML_Unknown.cpp \
./kml/KMLFileReadUtils.cpp
#}}}
# NEOPZ sources {{{
neopz_sources = ./classes/AmrNeopz.cpp
#}}}
# Modules sources {{{
modules_sources = \
./shared/Threads/LaunchThread.cpp \
./shared/Threads/PartitionRange.cpp \
./shared/Exp/exp.cpp \
./shared/Triangle/AssociateSegmentToElement.cpp \
./shared/Triangle/GridInsideHole.cpp \
./shared/Triangle/OrderSegments.cpp \
./shared/Triangle/SplitMeshForRifts.cpp \
./shared/Triangle/TriangleUtils.cpp \
./modules/Trianglex/Trianglex.cpp \
./modules/ProcessRiftsx/ProcessRiftsx.cpp \
./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.cpp \
./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp \
./modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp \
./modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp \
./modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp \
./modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp \
./modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp \
./modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp \
./modules/ContourToMeshx/ContourToMeshx.cpp \
./modules/ContourToMeshx/ContourToMeshxt.cpp \
./modules/ExpToLevelSetx/ExpToLevelSetx.cpp \
./modules/ExpToLevelSetx/ExpToLevelSetxt.cpp \
./modules/ContourToNodesx/ContourToNodesx.cpp \
./modules/DistanceToMaskBoundaryx/DistanceToMaskBoundaryx.cpp \
./modules/DistanceToMaskBoundaryx/DistanceToMaskBoundaryxt.cpp \
./modules/NodeConnectivityx/NodeConnectivityx.cpp \
./modules/ElementConnectivityx/ElementConnectivityx.cpp \
./modules/PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.cpp
if CHACO
modules_sources += \
./modules/Chacox/Chacox.cpp \
./modules/Chacox/input_parse.cpp \
./modules/Chacox/chaco_seconds.cpp \
./modules/Chacox/user_params.cpp
endif
if SCOTCH
modules_sources += ./modules/Scotchx/Scotchx.cpp
endif
#}}}
# Kriging (wrapper and executable)
# Kriging sources {{{
if KRIGING
issm_sources += \
./classes/kriging/Observations.cpp \
./classes/kriging/GaussianVariogram.cpp \
./classes/kriging/ExponentialVariogram.cpp \
./classes/kriging/SphericalVariogram.cpp \
./classes/kriging/PowerVariogram.cpp \
./classes/kriging/Quadtree.cpp \
./classes/kriging/Covertree.cpp \
./classes/kriging/Observation.cpp \
./modules/Krigingx/pKrigingx.cpp
modules_sources += \
./modules/Krigingx/Krigingx.cpp \
./modules/Krigingx/pKrigingx.cpp
endif
#}}}
# Library flags and sources {{{
ALL_CXXFLAGS = $(CXXFLAGS)
if MSYS2
ALL_CXXFLAGS += -D_DO_NOT_LOAD_GLOBALS_ # Cannot have undefined symbols under MSYS2
ALL_CXXFLAGS += -D_USE_MATH_DEFINES # Need to open fence to math.h definitions when --std=c++ is used (which is the default)
endif
libISSMCore_la_SOURCES = $(issm_sources)
libISSMCore_la_CXXFLAGS = $(ALL_CXXFLAGS) $(DAKOTAFLAGS)
libISSMCore_la_FFLAGS = $(AM_FFLAGS)
libISSMCore_LIB_ADD = $(CHACOLIB) $(DAKOTALIB) $(PETSCLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(PARMETISLIB) $(METISLIB) $(HDF5LIB) $(TAOLIB) $(M1QN3LIB) $(SEMICLIB) $(PLAPACKLIB) $(MPLAPACKLIB) $(SUPERLULIB) $(SPOOLESLIB) $(BLACSLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(SCOTCHLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(ADOLCLIB) $(AMPILIB) $(ADJOINTMPILIB) $(METEOIOLIB) $(SNOWPACKLIB) $(PROJLIB)
if FORTRAN
libISSMCore_LIB_ADD += $(FLIBS) $(FORTRANLIB)
endif
libISSMCore_LIB_ADD += $(OSLIBS)
if MSYS2
libISSMCore_la_LIBADD = ${libISSMCore_LIB_ADD}
else
if !STANDALONE_LIBRARIES
libISSMCore_la_LIBADD = ${libISSMCore_LIB_ADD}
endif
endif
if NEOPZ
libISSMCore_la_SOURCES += $(neopz_sources)
endif
if WRAPPERS
libISSMModules_la_SOURCES = $(modules_sources)
libISSMModules_la_SOURCES += $(bamg_sources)
if KRIGING
libISSMModules_la_SOURCES += $(kriging_sources)
endif
if KML
libISSMModules_la_SOURCES += $(kml_sources)
endif
libISSMModules_la_CXXFLAGS = $(ALL_CXXFLAGS)
libISSMModules_LIB_ADD = $(TRIANGLELIB) $(CHACOLIB) $(BLASLAPACKLIB) $(OSLIBS)
libISSMModules_la_LIBADD = ./libISSMCore.la
if MSYS2
libISSMModules_la_LIBADD += ${libISSMModules_LIB_ADD}
else
if !STANDALONE_LIBRARIES
libISSMModules_la_LIBADD += ${libISSMModules_LIB_ADD}
endif
endif
endif
AM_LDFLAGS =
if !VERSION
AM_LDFLAGS += -avoid-version
endif
# NOTE:
# - On Linux, We probably do not need the -static flag as long as we only
# generate static libraries for external packages. Dynamic system libraries
# will be linked to, whether we like it or not, if no static version is
# available.
# - On macOS, static linking of binaries is not supported.
#
if STANDALONE_EXECUTABLES
if MAC
AM_LDFLAGS += -Wl,-rpath,'@loader_path/../lib'
else
if MSYS2
AM_LDFLAGS += -Wl,-static
else
AM_LDFLAGS += -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN/../lib'
endif
endif
endif
if !STANDALONE_EXECUTABLES
if MAC
if HAVE_FORTRANDIR
AM_LDFLAGS += -Wl,-rpath,$(FORTRANDIR)
endif
endif
endif
if VERSION
libISSMCore_la_LDFLAGS =
if WRAPPERS
libISSMModules_la_LDFLAGS =
endif
else
libISSMCore_la_LDFLAGS = -avoid-version
if WRAPPERS
libISSMModules_la_LDFLAGS = -avoid-version
endif
endif
if STANDALONE_LIBRARIES
if !MSYS2
libISSMCore_la_LDFLAGS += -static
if WRAPPERS
libISSMModules_la_LDFLAGS += -static
endif
endif
endif
if !MSYS2
libISSMOverload_la_SOURCES = ./shared/String/ApiPrintf.cpp
libISSMOverload_la_CFLAGS = -D_C_ -fPIC $(CFLAGS) $(CXXFLAGS)
if VERSION
libISSMOverload_la_LDFLAGS =
else
libISSMOverload_la_LDFLAGS = -avoid-version
endif
if STANDALONE_LIBRARIES
if !MSYS2
libISSMOverload_la_LDFLAGS += -static
endif
endif
endif
#}}}
# Executables {{{
if JAVASCRIPT
bin_PROGRAMS =
else
bin_PROGRAMS = issm issm_slc
endif
# Standard libraries
LDADD = ./libISSMCore.la
if !MSYS2
LDADD += ./libISSMOverload.la
endif
if WRAPPERS
LDADD += ./libISSMModules.la $(TRIANGLELIB)
endif
# External packages
LDADD += $(DAKOTALIB) $(SEMICLIB) $(M1QN3LIB) $(CHACOLIB) $(PETSCLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(PARMETISLIB) $(METISLIB) $(NEOPZLIB) $(TAOLIB) $(PLAPACKLIB) $(MPLAPACKLIB) $(SUPERLULIB) $(SPOOLESLIB) $(BLACSLIB) $(HDF5LIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(SCOTCHLIB) $(MKLLIB) $(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(AMPILIB) $(ADJOINTMPILIB) $(ADOLCLIB) $(MPILIB) $(METEOIOLIB) $(SNOWPACKLIB) $(PROJLIB) $(ESMFLIB)
if FORTRAN
LDADD += $(FLIBS) $(FORTRANLIB)
endif
LDADD += $(OSLIBS)
issm_SOURCES = main/issm.cpp
issm_CXXFLAGS= $(CXXFLAGS)
issm_slc_SOURCES = main/issm_slc.cpp
issm_slc_CXXFLAGS= $(CXXFLAGS)
if OCEAN
bin_PROGRAMS += issm_ocean
issm_ocean_SOURCES = main/issm_ocean.cpp
issm_ocean_CXXFLAGS= $(CXXFLAGS)
endif
if KRIGING
bin_PROGRAMS += kriging
kriging_SOURCES = main/kriging.cpp
kriging_CXXFLAGS= $(CXXFLAGS)
endif
if ISSM_DAKOTA
bin_PROGRAMS += issm_dakota
issm_dakota_SOURCES = main/issm_dakota.cpp
issm_dakota_CXXFLAGS= $(CXXFLAGS)
bin_PROGRAMS += issm_post
issm_post_SOURCES = main/issm_post.cpp
issm_post_CXXFLAGS= $(CXXFLAGS)
endif
#}}}