forked from erdc/proteus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
928 lines (915 loc) · 63.5 KB
/
setup.py
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
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
import sys
import setuptools
from distutils import sysconfig
cfg_vars = sysconfig.get_config_vars()
for key, value in cfg_vars.items():
if type(value) == str:
cfg_vars[key] = cfg_vars[key].replace("-Wstrict-prototypes", "")
cfg_vars[key] = cfg_vars[key].replace("-Wall", "")
cfg_vars[key] = cfg_vars[key].replace("-O3", "")
cfg_vars[key] = cfg_vars[key].replace("-O2", "")
cfg_vars[key] = cfg_vars[key].replace("-DNDEBUG", "")
cfg_vars[key] = cfg_vars[key].replace(" -g ", " ")
from distutils.core import setup, Extension
from Cython.Build import cythonize
import numpy
from Cython.Build import cythonize
from Cython.Distutils.extension import Extension
from Cython.Distutils import build_ext
## \file setup.py setup.py
# \brief The python script for building proteus
#
# Set the DISTUTILS_DEBUG environment variable to print detailed information while setup.py is running.
#
from proteus import config
from proteus.config import *
###to turn on debugging in c++
##\todo Finishing cleaning up setup.py/setup.cfg, config.py...
PROTEUS_PETSC_EXTRA_LINK_ARGS = getattr(config, 'PROTEUS_PETSC_EXTRA_LINK_ARGS', [])
PROTEUS_PETSC_EXTRA_COMPILE_ARGS = getattr(config, 'PROTEUS_PETSC_EXTRA_COMPILE_ARGS', [])
PROTEUS_CHRONO_CXX_FLAGS = getattr(config, 'PROTEUS_CHRONO_CXX_FLAGS', [])
proteus_install_path = os.path.join(sysconfig.get_python_lib(), 'proteus')
# handle non-system installations
for arg in sys.argv:
if arg.startswith('--root'):
proteus_install_path = proteus_install_path.partition(sys.prefix + '/')[-1]
break
if arg.startswith('--prefix'):
proteus_install_path = proteus_install_path.partition(sys.prefix + '/')[-1]
break
EXTENSIONS_TO_BUILD = [
# Extension("MeshAdaptPUMI.MeshAdaptPUMI",
# sources = ['proteus/MeshAdaptPUMI/MeshAdaptPUMI.pyx', 'proteus/MeshAdaptPUMI/cMeshAdaptPUMI.cpp',
# 'proteus/MeshAdaptPUMI/MeshConverter.cpp', 'proteus/MeshAdaptPUMI/ParallelMeshConverter.cpp',
# 'proteus/MeshAdaptPUMI/MeshFields.cpp', 'proteus/MeshAdaptPUMI/SizeField.cpp',
# 'proteus/MeshAdaptPUMI/DumpMesh.cpp',
# 'proteus/MeshAdaptPUMI/ErrorResidualMethod.cpp','proteus/MeshAdaptPUMI/VMS.cpp','proteus/MeshAdaptPUMI/createAnalyticGeometry.cpp'],
# depends=["proteus/partitioning.h",
# "proteus/partitioning.cpp",
# "proteus/cpartitioning.pyx",
# "proteus/cmeshTools.pxd",
# "proteus/mesh.h",
# 'proteus/mesh.cpp',
# 'proteus/meshio.cpp'],
# define_macros=[('PROTEUS_SUPERLU_H',PROTEUS_SUPERLU_H)],
# language='c++',
# include_dirs=[numpy.get_include(),'include',
# 'proteus','proteus/MeshAdaptPUMI']+
# PROTEUS_SCOREC_INCLUDE_DIRS,
# library_dirs=PROTEUS_SCOREC_LIB_DIRS,
# libraries=PROTEUS_SCOREC_LIBS,
# extra_compile_args=PROTEUS_SCOREC_EXTRA_COMPILE_ARGS+PROTEUS_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
# extra_link_args=PROTEUS_SCOREC_EXTRA_LINK_ARGS),#+PROTEUS_EXTRA_LINK_ARGS),
Extension("mprans.cPres",['proteus/mprans/cPres.pyx'],
depends=['proteus/mprans/Pres.h', 'proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus'],),
Extension("mprans.cPresInit",['proteus/mprans/cPresInit.pyx'],
depends=['proteus/mprans/PresInit.h', 'proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("mprans.cPresInc",['proteus/mprans/cPresInc.pyx'],
depends=['proteus/mprans/PresInc.h', 'proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("mprans.cAddedMass",['proteus/mprans/cAddedMass.pyx'],
depends=['proteus/mprans/AddedMass.h', 'proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("mprans.SedClosure",['proteus/mprans/SedClosure.pyx'],
depends=['proteus/mprans/SedClosure.h', 'proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("mprans.cVOF3P",['proteus/mprans/cVOF3P.pyx'],
depends=['proteus/mprans/VOF3P.h', 'proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("mprans.cVOS3P",['proteus/mprans/cVOS3P.pyx'],
depends=['proteus/mprans/VOS3P.h', 'proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("mprans.cNCLS3P",['proteus/mprans/cNCLS3P.pyx'],
depends=['proteus/mprans/NCLS3P.h', 'proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("mprans.cRDLS3P",['proteus/mprans/cRDLS3P.pyx'],
depends=['proteus/mprans/RDLS3P.h', 'proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("mprans.cMCorr3P",
["proteus/mprans/cMCorr3P.pyx"],
depends=["proteus/mprans/MCorr3P.h", 'proteus/ModelFactory.h', 'proteus/CompKernel.h'],
define_macros=[('PROTEUS_LAPACK_H',
PROTEUS_LAPACK_H),
('PROTEUS_LAPACK_INTEGER',
PROTEUS_LAPACK_INTEGER),
('PROTEUS_BLAS_H',
PROTEUS_BLAS_H)],
language="c++",
include_dirs=[numpy.get_include(), 'proteus'],
library_dirs=[PROTEUS_LAPACK_LIB_DIR,
PROTEUS_BLAS_LIB_DIR],
libraries=['m',PROTEUS_LAPACK_LIB,
PROTEUS_BLAS_LIB],
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS),
Extension("richards.cRichards",['proteus/richards/cRichards.pyx'],
depends=['proteus/richards/Richards.h','proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("elastoplastic.cElastoPlastic",
['proteus/elastoplastic/cElastoPlastic.pyx'],
define_macros=[('PROTEUS_LAPACK_H',
PROTEUS_LAPACK_H),
('PROTEUS_LAPACK_INTEGER',
PROTEUS_LAPACK_INTEGER),
('PROTEUS_BLAS_H',
PROTEUS_BLAS_H)],
depends=['proteus/elastoplastic/ElastoPlastic.h','proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
include_dirs=[numpy.get_include(),'proteus'],
library_dirs=[PROTEUS_LAPACK_LIB_DIR,
PROTEUS_BLAS_LIB_DIR],
libraries=['m',PROTEUS_LAPACK_LIB,
PROTEUS_BLAS_LIB],
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS),
Extension("mprans.cRANS3PF",['proteus/mprans/cRANS3PF.pyx'],
depends=['proteus/mprans/RANS3PF.h','proteus/mprans/RANS3PF2D.h', 'proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("mprans.cRANS3PSed",['proteus/mprans/cRANS3PSed.pyx'],
depends=['proteus/mprans/RANS3PSed.h','proteus/mprans/RANS3PSed2D.h', 'proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("Isosurface",['proteus/Isosurface.pyx'],
language='c',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus'],
extra_link_args=PROTEUS_EXTRA_LINK_ARGS),
Extension("BoundaryConditions",['proteus/BoundaryConditions.py'],
language='c',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("mprans.BoundaryConditions",['proteus/mprans/BoundaryConditions.py'],
language='c',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("mprans.MeshSmoothing",['proteus/mprans/MeshSmoothing.pyx'],
language='c++',
include_dirs=[numpy.get_include(),'proteus',PROTEUS_INCLUDE_DIR],
libraries=['stdc++','m'],
extra_compile_args=["-std=c++11","-mavx"]),
Extension("mprans.cMoveMeshMonitor",['proteus/mprans/cMoveMeshMonitor.pyx'],
language='c++',
include_dirs=[numpy.get_include(),'proteus',PROTEUS_INCLUDE_DIR],
libraries=['stdc++','m'],
extra_compile_args=["-std=c++11","-mavx"]),
Extension("mbd.CouplingFSI",
sources=['proteus/mbd/CouplingFSI.pyx',
'proteus/mbd/CouplingFSI.pxd',
'proteus/mbd/ChVariablesBodyAddedMass.cpp',
'proteus/mbd/ChBodyAddedMass.cpp',
'proteus/mbd/ChronoHeaders.pxd'],
depends=['proteus/mbd/ProtChBody.h',
'proteus/mbd/ProtChMoorings.h'],
language='c++',
include_dirs=[numpy.get_include(),
'proteus',
PROTEUS_INCLUDE_DIR,
PROTEUS_CHRONO_INCLUDE_DIR,
PROTEUS_CHRONO_INCLUDE_DIR+'/chrono',
PROTEUS_CHRONO_INCLUDE_DIR+'/chrono/collision/bullet',],
library_dirs=[PROTEUS_CHRONO_LIB_DIR],
libraries=['ChronoEngine',
'stdc++',
'm'],
extra_compile_args=PROTEUS_CHRONO_CXX_FLAGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS),
Extension("WaveTools",['proteus/WaveTools.py'],
depends=['proteus/WaveTools.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("fenton.Fenton",
sources=['proteus/fenton/Fenton.pyx',
'proteus/fenton/Solve.cpp',
'proteus/fenton/Dpythag.cpp',
'proteus/fenton/Dsvbksb.cpp',
'proteus/fenton/Dsvdcmp.cpp',
'proteus/fenton/Inout.cpp',
'proteus/fenton/Subroutines.cpp',
'proteus/fenton/Util.cpp',],
language='c++',
include_dirs=[numpy.get_include(),
'proteus',
PROTEUS_INCLUDE_DIR,
PROTEUS_NCURSES_INCLUDE_DIR,],
library_dirs=[PROTEUS_NCURSES_LIB_DIR,],
libraries=['ncurses','stdc++','m'],
extra_compile_args=["-std=c++11"]),
Extension("ADR",['proteus/ADR.pyx'],
depends=['proteus/ADR.h', 'proteus/ModelFactory.h', 'proteus/CompKernel.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus']),
Extension("subsurfaceTransportFunctions",['proteus/subsurfaceTransportFunctions.pyx'],
include_dirs=[numpy.get_include(),'proteus'],
extra_compile_args=PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS),
Extension('cfemIntegrals',
['proteus/cfemIntegrals.pyx',
'proteus/femIntegrals.c',
'proteus/postprocessing.c'],
depends=['proteus/femIntegrals.h'],
define_macros=[('PROTEUS_SUPERLU_H',PROTEUS_SUPERLU_H),
('PROTEUS_LAPACK_H',PROTEUS_LAPACK_H),
('PROTEUS_LAPACK_INTEGER',PROTEUS_LAPACK_INTEGER),
('PROTEUS_BLAS_H',PROTEUS_BLAS_H)],
include_dirs=[numpy.get_include(),'proteus',
PROTEUS_SUPERLU_INCLUDE_DIR,
PROTEUS_LAPACK_INCLUDE_DIR,
PROTEUS_BLAS_INCLUDE_DIR],
library_dirs=[PROTEUS_LAPACK_LIB_DIR,
PROTEUS_BLAS_LIB_DIR],
libraries=['m',PROTEUS_LAPACK_LIB,PROTEUS_BLAS_LIB],
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS),
Extension("csparsity",['proteus/csparsity.pyx', 'proteus/sparsity.cpp'],
depends=['proteus/sparsity.h'],
language='c++',
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(),'proteus'],),
Extension("cmeshTools",
['proteus/cmeshTools.pyx', 'proteus/mesh.cpp', 'proteus/meshio.cpp'],
language='c++',
define_macros=[('PROTEUS_TRIANGLE_H',PROTEUS_TRIANGLE_H),
('PROTEUS_SUPERLU_H',PROTEUS_SUPERLU_H),
('CMRVEC_BOUNDS_CHECK',1),
('MV_VECTOR_BOUNDS_CHECK',1),
('PETSCVEC_BOUNDS_CHECK',1),
('F77_POST_UNDERSCORE',1),
('USE_BLAS',1)],
include_dirs=['proteus',
numpy.get_include(),
PROTEUS_SUPERLU_INCLUDE_DIR,
PROTEUS_TRIANGLE_INCLUDE_DIR,
PROTEUS_DAETK_INCLUDE_DIR,
PROTEUS_HDF5_INCLUDE_DIR] + \
PROTEUS_PETSC_INCLUDE_DIRS + \
PROTEUS_MPI_INCLUDE_DIRS,
library_dirs=[PROTEUS_DAETK_LIB_DIR]+PROTEUS_PETSC_LIB_DIRS+PROTEUS_MPI_LIB_DIRS+PROTEUS_HDF5_LIB_DIRS,
libraries=['hdf5','stdc++','m',PROTEUS_DAETK_LIB]+PROTEUS_PETSC_LIBS+PROTEUS_MPI_LIBS+PROTEUS_HDF5_LIBS,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS + PROTEUS_PETSC_EXTRA_LINK_ARGS,
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS + PROTEUS_PETSC_EXTRA_COMPILE_ARGS+PROTEUS_OPT),
Extension('ctransportCoefficients',
['proteus/ctransportCoefficients.pyx','proteus/transportCoefficients.c'],
include_dirs=[numpy.get_include(),'proteus'],
depends=["proteus/transportCoefficients.h"],
language="c",
libraries=['m']),
Extension('csubgridError',
['proteus/csubgridError.pyx','proteus/subgridError.c'],
depends=["proteus/subgridError.h"],
language="c",
include_dirs=[numpy.get_include(),'proteus'],
libraries=['m'],
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS),
Extension('cshockCapturing',
['proteus/cshockCapturing.pyx','proteus/shockCapturing.c'],
depends=["proteus/shockCapturing.h"],
language="c",
include_dirs=[numpy.get_include(),'proteus'],
libraries=['m'],
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS),
Extension('superluWrappers',
['proteus/superluWrappers.pyx'],
define_macros=[('PROTEUS_SUPERLU_H',PROTEUS_SUPERLU_H),
('PROTEUS_BLAS_H',PROTEUS_BLAS_H)],
language="c",
include_dirs=[numpy.get_include(),
'proteus',
PROTEUS_SUPERLU_INCLUDE_DIR],
library_dirs=[PROTEUS_SUPERLU_LIB_DIR,
PROTEUS_LAPACK_LIB_DIR,
PROTEUS_BLAS_LIB_DIR],
libraries=['m',
PROTEUS_SUPERLU_LIB,
PROTEUS_LAPACK_LIB,PROTEUS_BLAS_LIB],
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS),
Extension("csmoothers",["proteus/csmoothers.pyx", "proteus/smoothers.c"],
define_macros=[('PROTEUS_SUPERLU_H',PROTEUS_SUPERLU_H),
('PROTEUS_LAPACK_H',PROTEUS_LAPACK_H),
('PROTEUS_LAPACK_INTEGER',PROTEUS_LAPACK_INTEGER),
('PROTEUS_BLAS_H',PROTEUS_BLAS_H)],
language="c",
include_dirs=['proteus',
numpy.get_include(),
PROTEUS_SUPERLU_INCLUDE_DIR,
PROTEUS_LAPACK_INCLUDE_DIR,
PROTEUS_BLAS_INCLUDE_DIR,
],
library_dirs=[PROTEUS_SUPERLU_INCLUDE_DIR,
PROTEUS_SUPERLU_LIB_DIR,
PROTEUS_LAPACK_LIB_DIR,
PROTEUS_BLAS_LIB_DIR],
libraries=['m',
PROTEUS_SUPERLU_LIB,
PROTEUS_LAPACK_LIB,
PROTEUS_BLAS_LIB],
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS),
Extension("canalyticalSolutions",["proteus/canalyticalSolutions.pyx", "proteus/analyticalSolutions.c"],
depends=["proteus/analyticalSolutions.h"],
extra_compile_args=PROTEUS_OPT,
language="c", include_dirs=[numpy.get_include(), 'proteus']),
Extension("clapack",
["proteus/clapack.pyx"],
depends=["proteus/proteus_lapack.h","proteus/proteus_blas.h"],
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS,
language="c",
include_dirs=[numpy.get_include(), 'proteus',
PROTEUS_LAPACK_INCLUDE_DIR,
PROTEUS_BLAS_INCLUDE_DIR],
library_dirs=[PROTEUS_LAPACK_LIB_DIR,PROTEUS_BLAS_LIB_DIR],
libraries=['m',
PROTEUS_LAPACK_LIB,
PROTEUS_BLAS_LIB]),
Extension("cpostprocessing",
["proteus/cpostprocessing.pyx","proteus/postprocessing.c"],
depends=["proteus/postprocessing.h","proteus/postprocessing.pxd"],
define_macros=[('PROTEUS_LAPACK_H',PROTEUS_LAPACK_H),
('PROTEUS_LAPACK_INTEGER',PROTEUS_LAPACK_INTEGER),
('PROTEUS_BLAS_H',PROTEUS_BLAS_H)],
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS,
language="c",
include_dirs=[numpy.get_include(), 'proteus',
PROTEUS_LAPACK_INCLUDE_DIR,
PROTEUS_BLAS_INCLUDE_DIR],
library_dirs=[PROTEUS_LAPACK_LIB_DIR,PROTEUS_BLAS_LIB_DIR],
libraries=['m',
PROTEUS_LAPACK_LIB,
PROTEUS_BLAS_LIB]),
Extension('cnumericalFlux',
['proteus/cnumericalFlux.pyx','proteus/numericalFlux.c'],
depends=["proteus/numericalFlux.h"],
extra_compile_args=PROTEUS_OPT,
language="c", include_dirs=[numpy.get_include(), 'proteus']),
Extension('ctimeIntegration',
['proteus/ctimeIntegration.pyx','proteus/timeIntegration.c'],
depends=["proteus/timeIntegration.h"],
extra_compile_args=PROTEUS_OPT,
language="c", include_dirs=[numpy.get_include(), 'proteus']),
Extension("cTwophaseDarcyCoefficients",
["proteus/cTwophaseDarcyCoefficients.pyx",
"proteus/SubsurfaceTransportCoefficients.cpp"],
depends=["proteus/SubsurfaceTransportCoefficients.h",
"proteus/pskRelations.h",
"proteus/pskRelations.pxd",
"proteus/densityRelations.h",
"proteus/twophaseDarcyCoefficients.pxd",
"proteus/twophaseDarcyCoefficients.h"],
define_macros=[('PROTEUS_TRIANGLE_H',PROTEUS_TRIANGLE_H),
('PROTEUS_SUPERLU_H',PROTEUS_SUPERLU_H),
('CMRVEC_BOUNDS_CHECK',1),
('MV_VECTOR_BOUNDS_CHECK',1),
('PETSCVEC_BOUNDS_CHECK',1),
('F77_POST_UNDERSCORE',1),
('USE_BLAS',1)],
include_dirs=['proteus',
numpy.get_include(),
PROTEUS_SUPERLU_INCLUDE_DIR,
PROTEUS_TRIANGLE_INCLUDE_DIR,
PROTEUS_DAETK_INCLUDE_DIR,
PROTEUS_HDF5_INCLUDE_DIR] + \
PROTEUS_PETSC_INCLUDE_DIRS + \
PROTEUS_MPI_INCLUDE_DIRS,
language="c++",
library_dirs=PROTEUS_PETSC_LIB_DIRS+PROTEUS_MPI_LIB_DIRS+PROTEUS_HDF5_LIB_DIRS,
libraries=['hdf5','stdc++','m']+PROTEUS_PETSC_LIBS+PROTEUS_MPI_LIBS+PROTEUS_HDF5_LIBS,
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS + PROTEUS_PETSC_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS + PROTEUS_PETSC_EXTRA_LINK_ARGS,
),
Extension("cSubsurfaceTransportCoefficients",
["proteus/cSubsurfaceTransportCoefficients.pyx","proteus/SubsurfaceTransportCoefficients.cpp"],
depends=["proteus/SubsurfaceTransportCoefficients.pxd",
"proteus/SubsurfaceTransportCoefficients.h"],
define_macros=[('PROTEUS_TRIANGLE_H',PROTEUS_TRIANGLE_H),
('PROTEUS_SUPERLU_H',PROTEUS_SUPERLU_H),
('CMRVEC_BOUNDS_CHECK',1),
('MV_VECTOR_BOUNDS_CHECK',1),
('PETSCVEC_BOUNDS_CHECK',1),
('F77_POST_UNDERSCORE',1),
('USE_BLAS',1)],
include_dirs=['proteus',
numpy.get_include(),
PROTEUS_SUPERLU_INCLUDE_DIR,
PROTEUS_TRIANGLE_INCLUDE_DIR,
PROTEUS_DAETK_INCLUDE_DIR,
PROTEUS_HDF5_INCLUDE_DIR] + \
PROTEUS_PETSC_INCLUDE_DIRS + \
PROTEUS_MPI_INCLUDE_DIRS,
language="c++",
library_dirs=PROTEUS_PETSC_LIB_DIRS+PROTEUS_MPI_LIB_DIRS+PROTEUS_HDF5_LIB_DIRS,
libraries=['hdf5','stdc++','m']+PROTEUS_PETSC_LIBS+PROTEUS_MPI_LIBS+PROTEUS_HDF5_LIBS,
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS + PROTEUS_PETSC_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS + PROTEUS_PETSC_EXTRA_LINK_ARGS,
),
Extension("cpskRelations",["proteus/cpskRelations.pyx"],
depends=["proteus/pskRelations.pxd",
"proteus/pskRelations.h"],
define_macros=[('PROTEUS_TRIANGLE_H',PROTEUS_TRIANGLE_H),
('PROTEUS_SUPERLU_H',PROTEUS_SUPERLU_H),
('CMRVEC_BOUNDS_CHECK',1),
('MV_VECTOR_BOUNDS_CHECK',1),
('PETSCVEC_BOUNDS_CHECK',1),
('F77_POST_UNDERSCORE',1),
('USE_BLAS',1)],
include_dirs=['proteus',
numpy.get_include(),
PROTEUS_SUPERLU_INCLUDE_DIR,
PROTEUS_TRIANGLE_INCLUDE_DIR,
PROTEUS_DAETK_INCLUDE_DIR,
PROTEUS_HDF5_INCLUDE_DIR] + \
PROTEUS_PETSC_INCLUDE_DIRS + \
PROTEUS_MPI_INCLUDE_DIRS,
language="c++",
library_dirs=PROTEUS_PETSC_LIB_DIRS+PROTEUS_MPI_LIB_DIRS+PROTEUS_HDF5_LIB_DIRS,
libraries=['hdf5','stdc++','m']+PROTEUS_PETSC_LIBS+PROTEUS_MPI_LIBS+PROTEUS_HDF5_LIBS,
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS + PROTEUS_PETSC_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS + PROTEUS_PETSC_EXTRA_LINK_ARGS,
),
Extension("cpartitioning",["proteus/cpartitioning.pyx",
"proteus/partitioning.cpp",
'proteus/mesh.cpp',
'proteus/meshio.cpp',],
depends=["proteus/partitioning.h",
"proteus/partitioning.cpp",
"proteus/cpartitioning.pyx",
"proteus/cmeshTools.pxd",
"proteus/mesh.h",
'proteus/mesh.cpp',
'proteus/meshio.cpp'],
define_macros=[('PROTEUS_TRIANGLE_H',PROTEUS_TRIANGLE_H),
('PROTEUS_SUPERLU_H',PROTEUS_SUPERLU_H),
('CMRVEC_BOUNDS_CHECK',1),
('MV_VECTOR_BOUNDS_CHECK',1),
('PETSCVEC_BOUNDS_CHECK',1),
('F77_POST_UNDERSCORE',1),
('USE_BLAS',1)],
include_dirs=['proteus',
numpy.get_include(),
PROTEUS_SUPERLU_INCLUDE_DIR,
PROTEUS_TRIANGLE_INCLUDE_DIR,
PROTEUS_DAETK_INCLUDE_DIR,
PROTEUS_HDF5_INCLUDE_DIR] + \
PROTEUS_PETSC_INCLUDE_DIRS + \
PROTEUS_MPI_INCLUDE_DIRS,
language="c++",
library_dirs=PROTEUS_PETSC_LIB_DIRS+PROTEUS_MPI_LIB_DIRS+PROTEUS_HDF5_LIB_DIRS,
libraries=['hdf5','stdc++','m']+PROTEUS_PETSC_LIBS+PROTEUS_MPI_LIBS+PROTEUS_HDF5_LIBS,
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS + PROTEUS_PETSC_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS + PROTEUS_PETSC_EXTRA_LINK_ARGS,
),
Extension("flcbdfWrappers",["proteus/flcbdfWrappers.pyx"],
language="c++",
depends=["proteus/flcbdfWrappers.pxd"],
define_macros=[('PROTEUS_TRIANGLE_H',PROTEUS_TRIANGLE_H),
('PROTEUS_SUPERLU_H',PROTEUS_SUPERLU_H),
('CMRVEC_BOUNDS_CHECK',1),
('MV_VECTOR_BOUNDS_CHECK',1),
('PETSCVEC_BOUNDS_CHECK',1),
('F77_POST_UNDERSCORE',1),
('USE_BLAS',1)],
include_dirs=['proteus',
numpy.get_include(),
PROTEUS_SUPERLU_INCLUDE_DIR,
PROTEUS_TRIANGLE_INCLUDE_DIR,
PROTEUS_DAETK_INCLUDE_DIR,
PROTEUS_HDF5_INCLUDE_DIR] + \
PROTEUS_PETSC_INCLUDE_DIRS + \
PROTEUS_MPI_INCLUDE_DIRS,
library_dirs=[PROTEUS_DAETK_LIB_DIR]+PROTEUS_PETSC_LIB_DIRS+PROTEUS_MPI_LIB_DIRS+PROTEUS_HDF5_LIB_DIRS,
libraries=['hdf5','stdc++','m',PROTEUS_DAETK_LIB]+PROTEUS_PETSC_LIBS+PROTEUS_MPI_LIBS+PROTEUS_HDF5_LIBS,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS + PROTEUS_PETSC_EXTRA_LINK_ARGS,
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS + PROTEUS_PETSC_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
),
Extension("mprans.cCLSVOF",["proteus/mprans/cCLSVOF.pyx"],
depends=["proteus/mprans/CLSVOF.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
language="c++",
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(), 'proteus']),
Extension("mprans.cNCLS",["proteus/mprans/cNCLS.pyx"],
depends=["proteus/mprans/NCLS.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
language="c++",
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(), 'proteus']),
Extension("mprans.cMCorr",["proteus/mprans/cMCorr.pyx"],
depends=["proteus/mprans/MCorr.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
define_macros=[('PROTEUS_LAPACK_H',PROTEUS_LAPACK_H),
('PROTEUS_LAPACK_INTEGER',PROTEUS_LAPACK_INTEGER),
('PROTEUS_BLAS_H',PROTEUS_BLAS_H)],language="c++",
include_dirs=[numpy.get_include(), 'proteus'],
library_dirs=[PROTEUS_LAPACK_LIB_DIR,
PROTEUS_BLAS_LIB_DIR],
libraries=['m',PROTEUS_LAPACK_LIB,PROTEUS_BLAS_LIB],
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS),
Extension("mprans.cRANS2P",["proteus/mprans/cRANS2P.pyx"],
depends=["proteus/mprans/RANS2P.h"] + ["proteus/MixedModelFactory.h","proteus/CompKernel.h"],
extra_compile_args=PROTEUS_OPT,
language="c++", include_dirs=[numpy.get_include(), 'proteus']),
Extension("mprans.cRANS2P2D",["proteus/mprans/cRANS2P2D.pyx"],
depends=["proteus/mprans/RANS2P2D.h"] + ["proteus/MixedModelFactory.h","proteus/CompKernel.h"],
language="c++",
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(), 'proteus']),
Extension("mprans.cRDLS",["proteus/mprans/cRDLS.pyx"],
depends=["proteus/mprans/RDLS.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
language="c++",
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(), 'proteus']),
Extension("mprans.cVOF",["proteus/mprans/cVOF.pyx"],
depends=["proteus/mprans/VOF.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
language="c++",
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(), 'proteus']),
Extension("mprans.cMoveMesh",["proteus/mprans/cMoveMesh.pyx"],
depends=["proteus/mprans/MoveMesh.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
language="c++",
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(), 'proteus']),
Extension("mprans.cMoveMesh2D",["proteus/mprans/cMoveMesh2D.pyx"],
depends=["proteus/mprans/MoveMesh2D.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
language="c++",
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(), 'proteus']),
Extension("mprans.cSW2D",["proteus/mprans/cSW2D.pyx"],
depends=["proteus/mprans/SW2D.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
language="c++",
include_dirs=[numpy.get_include(), 'proteus'],
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS+['-g']+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS+['-g']),
Extension("mprans.cSW2DCV",["proteus/mprans/cSW2DCV.pyx"],
depends=["proteus/mprans/SW2DCV.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
language="c++",
include_dirs=[numpy.get_include(), 'proteus'],
extra_compile_args=PROTEUS_EXTRA_COMPILE_ARGS+['-g']+PROTEUS_OPT,
extra_link_args=PROTEUS_EXTRA_LINK_ARGS+['-g']),
Extension("mprans.cKappa",["proteus/mprans/cKappa.pyx"],
depends=["proteus/mprans/Kappa.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
language="c++",
include_dirs=[numpy.get_include(), 'proteus']),
Extension("mprans.cKappa2D",["proteus/mprans/cKappa2D.pyx"],
depends=["proteus/mprans/Kappa2D.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
language="c++",
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(), 'proteus']),
Extension("mprans.cDissipation",["proteus/mprans/cDissipation.pyx"],
depends=["proteus/mprans/Dissipation.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
language="c++",
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(), 'proteus']),
Extension("mprans.cDissipation2D",["proteus/mprans/cDissipation2D.pyx"],
depends=["proteus/mprans/Dissipation2D.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
language="c++",
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(), 'proteus']),
Extension("mprans.cRANS2P_IB",["proteus/mprans/cRANS2P_IB.pyx"],
depends=["proteus/mprans/RANS2P_IB.h"] + ["proteus/ModelFactory.h","proteus/CompKernel.h"],
language="c++",
extra_compile_args=PROTEUS_OPT,
include_dirs=[numpy.get_include(), 'proteus'])
]
def setup_given_extensions(extensions):
setup(name='proteus',
version='1.6.0.dev0',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7'
'Programming Language :: Python :: 2 :: Only',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Physics',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX',
],
description='Python tools for multiphysics modeling',
author='The Proteus Developers',
author_email='[email protected]',
url='http://proteustoolkit.org',
packages = ['proteus',
'proteus.fenton',
'proteus.mprans',
'proteus.richards',
'proteus.elastoplastic',
'proteus.mbd',
'proteus.test_utils',
'proteus.config',
'proteus.tests',
'proteus.tests.ci',
'proteus.tests.griffiths_lane_6',
'proteus.tests.levelset',
'proteus.tests.linalgebra_tests',
'proteus.tests.LS_with_edgeBased_EV',
'proteus.tests.LS_with_edgeBased_EV.VOF',
'proteus.tests.LS_with_edgeBased_EV.NCLS',
'proteus.tests.BernsteinPolynomials',
'proteus.tests.BernsteinPolynomials.poisson_eqn',
'proteus.tests.elliptic_redist',
'proteus.tests.elliptic_redist.RDLS',
'proteus.tests.elliptic_redist.RDLS3P',
'proteus.tests.surface_tension',
'proteus.tests.surface_tension.rising_bubble_rans3p',
'proteus.tests.CLSVOF',
'proteus.tests.CLSVOF.disc_ICs',
'proteus.tests.CLSVOF.with_RANS2P',
'proteus.tests.CLSVOF.with_RANS3PF',
'proteus.tests.CLSVOF.pure_level_set',
'proteus.TwoPhaseFlow',
'proteus.TwoPhaseFlow.utils',
'proteus.tests.TwoPhaseFlow',
'proteus.tests.SWEs',
'proteus.tests.SWEs.dam_over_bumps',
'proteus.tests.SWEs.oneD_dambreak_flat_bottom',
'proteus.tests.SWEs.paraboloid_with_friction',
'proteus.tests.SWEs.paraboloid_with_friction.oneD',
'proteus.tests.SWEs.paraboloid_with_friction.twoD',
'proteus.tests.SWEs.test_gauges',
'proteus.tests.SWEs.test_reflecting_BCs',
'proteus.tests.matrix_constructor',
'proteus.tests.matrix_constructor.import_modules',
'proteus.MeshAdaptPUMI',
'proteus.tests.MeshAdaptPUMI',
'proteus.tests.MeshAdaptPUMI.gauge_compare.dambreak_Colagrossi_2D',
'proteus.tests.mesh_tests',
'proteus.tests.mesh_tests.import_modules',
'proteus.tests.periodic',
'proteus.tests.periodic.petsc',
'proteus.tests.periodic.comparison_files',
'proteus.tests.poisson_2d',
'proteus.tests.post_processing',
'proteus.tests.post_processing.import_modules',
'proteus.tests.ProjScheme_with_EV',
'proteus.tests.single_phase_gw',
'proteus.tests.solver_tests',
'proteus.tests.solver_tests.import_modules',
'proteus.tests.solver_tests_slow',
'proteus.tests.solver_tests_slow.import_modules',
'proteus.tests.solver_tests_mprans',
'proteus.tests.solver_tests_mprans.import_modules',
'proteus.tests.cylinder2D',
'proteus.tests.cylinder2D.conforming_rans2p',
'proteus.tests.cylinder2D.conforming_rans3p',
'proteus.tests.cylinder2D.ibm_method',
'proteus.tests.cylinder2D.ibm_rans2p',
'proteus.tests.cylinder2D.ibm_rans2p_3D',
'proteus.tests.cylinder2D.sbm_method',
'proteus.tests.cylinder2D.sbm_3Dmesh',
'proteus.tests.HotStart_3P',
'proteus.tests.AddedMass',
'proteus.tests.MoveMeshMonitor',
'proteus.tests.wave_tests',
],
cmdclass = {'build_ext':build_ext},
ext_package='proteus',
ext_modules=extensions,
data_files=[(proteus_install_path,
['proteus/proteus_blas.h',
'proteus/proteus_lapack.h',
'proteus/proteus_superlu.h',
'proteus/ModelFactory.h',
'proteus/CompKernel.h'
]),
(os.path.join(proteus_install_path,'tests'),
['proteus/tests/hex_cube_3x3.xmf',
'proteus/tests/hex_cube_3x3.h5',
'proteus/tests/sparse_mat_ex.mtx']),
(os.path.join(proteus_install_path,'tests','linalgebra_tests'),
['proteus/tests/linalgebra_tests/sparse_mat_1.txt',
'proteus/tests/linalgebra_tests/jac.bin']),
(os.path.join(proteus_install_path,'tests','griffiths_lane_6'),
['proteus/tests/griffiths_lane_6/richards_expected.h5',
'proteus/tests/griffiths_lane_6/elastoplastic_expected.h5']),
(os.path.join(proteus_install_path,'tests','levelset'),
['proteus/tests/levelset/rotation/rotation_c0p1cg_vbdf_2_level_1_expected.h5',
'proteus/tests/levelset/vortex2D/vortex_c0p1cg_vbdf_2_level_1_expected.h5',
'proteus/tests/levelset/vortex/vortex_c0p1cg_bdf_2_level_1_expected.h5']),
(os.path.join(proteus_install_path,'tests','ci','comparison_files'),
['proteus/tests/ci/comparison_files/floating_bar.h5',
'proteus/tests/ci/comparison_files/phi_t_0.000000_000.tgz']),
(os.path.join(proteus_install_path,'tests','LS_with_edgeBased_EV','VOF','comparison_files'),
['proteus/tests/LS_with_edgeBased_EV/VOF/comparison_files/vof_level_3_SmoothnessBased.h5',
'proteus/tests/LS_with_edgeBased_EV/VOF/comparison_files/vof_level_3_TaylorGalerkin.h5',
'proteus/tests/LS_with_edgeBased_EV/VOF/comparison_files/vof_level_3_stab4.h5',
'proteus/tests/LS_with_edgeBased_EV/VOF/comparison_files/vof_level_3_EV1.h5',
'proteus/tests/LS_with_edgeBased_EV/VOF/comparison_files/vof_level_3_SUPG.h5',
'proteus/tests/LS_with_edgeBased_EV/VOF/comparison_files/vof_level_3_EV2.h5']),
(os.path.join(proteus_install_path,'tests','LS_with_edgeBased_EV','NCLS','comparison_files'),
['proteus/tests/LS_with_edgeBased_EV/NCLS/comparison_files/ncls_level_3_non_saturated_ls.h5',
'proteus/tests/LS_with_edgeBased_EV/NCLS/comparison_files/ncls_level_3_pureAdvection_SUPG.h5',
'proteus/tests/LS_with_edgeBased_EV/NCLS/comparison_files/ncls_level_3_pureAdvection_EV1.h5',
'proteus/tests/LS_with_edgeBased_EV/NCLS/comparison_files/ncls_level_3_saturated_ls.h5']),
(os.path.join(proteus_install_path,'tests','BernsteinPolynomials','poisson_eqn','comparison_files'),
['proteus/tests/BernsteinPolynomials/poisson_eqn/comparison_files/2D_poisson_hex_degree2.h5',
'proteus/tests/BernsteinPolynomials/poisson_eqn/comparison_files/2D_poisson_simplex_degree2.h5',
'proteus/tests/BernsteinPolynomials/poisson_eqn/comparison_files/3D_poisson_hex_degree2.h5',
'proteus/tests/BernsteinPolynomials/poisson_eqn/comparison_files/3D_poisson_simplex_degree2.h5']),
(os.path.join(proteus_install_path,'tests','surface_tension','rising_bubble_rans3p','comparison_files'),
['proteus/tests/surface_tension/rising_bubble_rans3p/comparison_files/risingBubble_2D_supg.h5',
'proteus/tests/surface_tension/rising_bubble_rans3p/comparison_files/risingBubble_2D_ev.h5',
'proteus/tests/surface_tension/rising_bubble_rans3p/comparison_files/risingBubble_3D_supg.h5',
'proteus/tests/surface_tension/rising_bubble_rans3p/comparison_files/risingBubble_3D_ev.h5']),
(os.path.join(proteus_install_path,'tests','CLSVOF','disc_ICs','comparison_files'),
['proteus/tests/CLSVOF/disc_ICs/comparison_files/test_case_1.h5',
'proteus/tests/CLSVOF/disc_ICs/comparison_files/test_case_2.h5']),
(os.path.join(proteus_install_path,'tests','CLSVOF','pure_level_set','comparison_files'),
['proteus/tests/CLSVOF/pure_level_set/comparison_files/clsvof_test_case_1.h5',
'proteus/tests/CLSVOF/pure_level_set/comparison_files/clsvof_test_case_2.h5',
'proteus/tests/CLSVOF/pure_level_set/comparison_files/clsvof_test_case_3.h5',
'proteus/tests/CLSVOF/pure_level_set/comparison_files/clsvof_test_case_4.h5']),
(os.path.join(proteus_install_path,'tests','CLSVOF','with_RANS2P','comparison_files'),
['proteus/tests/CLSVOF/with_RANS2P/comparison_files/multiphase_2D_falling_bubble.h5']),
(os.path.join(proteus_install_path,'tests','CLSVOF','with_RANS3PF','comparison_files'),
['proteus/tests/CLSVOF/with_RANS3PF/comparison_files/multiphase_2D_falling_bubble.h5',
'proteus/tests/CLSVOF/with_RANS3PF/comparison_files/multiphase_3D_falling_bubble.h5']),
(os.path.join(proteus_install_path,'tests','TwoPhaseFlow','comparison_files'),
['proteus/tests/TwoPhaseFlow/comparison_files/risingBubble.h5',
'proteus/tests/TwoPhaseFlow/comparison_files/damBreak.h5',
'proteus/tests/TwoPhaseFlow/comparison_files/TwoDimBucklingFlow.h5',
'proteus/tests/TwoPhaseFlow/comparison_files/fillingTank.h5',
'proteus/tests/TwoPhaseFlow/comparison_files/marin.h5',
'proteus/tests/TwoPhaseFlow/comparison_files/moses.h5']),
(os.path.join(proteus_install_path,'tests','SWEs','dam_over_bumps','comparison_files'),
['proteus/tests/SWEs/dam_over_bumps/comparison_files/SWEs_dam_over_bumps.h5']),
(os.path.join(proteus_install_path,'tests','SWEs','oneD_dambreak_flat_bottom','comparison_files'),
['proteus/tests/SWEs/oneD_dambreak_flat_bottom/comparison_files/SWEs_oneD_dambreak_flat_bottom.h5']),
(os.path.join(proteus_install_path,'tests','SWEs','paraboloid_with_friction','oneD','comparison_files'),
['proteus/tests/SWEs/paraboloid_with_friction/oneD/comparison_files/SWEs_oneD_paraboloid_with_friction.h5']),
(os.path.join(proteus_install_path,'tests','SWEs','paraboloid_with_friction','twoD','comparison_files'),
['proteus/tests/SWEs/paraboloid_with_friction/twoD/comparison_files/SWEs_twoD_paraboloid_with_friction.h5']),
(os.path.join(proteus_install_path,'tests','SWEs','test_gauges','comparison_files'),
['proteus/tests/SWEs/test_gauges/comparison_files/SWEs_test_gauges.h5']),
(os.path.join(proteus_install_path,'tests','SWEs','test_reflecting_BCs','comparison_files'),
['proteus/tests/SWEs/test_reflecting_BCs/comparison_files/SWEs_test_reflecting_BCs.h5']),
(os.path.join(proteus_install_path,'tests','solver_tests','import_modules'),
['proteus/tests/solver_tests/import_modules/quad_mass_matrix.npy',
'proteus/tests/solver_tests/import_modules/sol_10.npy',
'proteus/tests/solver_tests/import_modules/sol_20_lst.npy',
'proteus/tests/solver_tests/import_modules/input_vec_tppcd.bin',
'proteus/tests/solver_tests/import_modules/tp_pcd_y_output.bin',
'proteus/tests/solver_tests/import_modules/tppcd_y_dirichlet_dof.bin',
'proteus/tests/solver_tests/import_modules/Qp_visc.bin',
'proteus/tests/solver_tests/import_modules/Qp_dens.bin',
'proteus/tests/solver_tests/import_modules/Ap_rho.bin',
'proteus/tests/solver_tests/import_modules/Np_rho.bin',
'proteus/tests/solver_tests/import_modules/saddle_point_small.bin',
'proteus/tests/solver_tests/import_modules/saddle_point_matrix.bin',
'proteus/tests/solver_tests/import_modules/rans2p_step_newton_1.bin',
'proteus/tests/solver_tests/import_modules/rans2p_step_newton_5.bin',
'proteus/tests/solver_tests/import_modules/NSE_cavity_matrix.bin',
'proteus/tests/solver_tests/import_modules/NSE_step_no_slip.bin']),
(os.path.join(proteus_install_path,'tests','mesh_tests','comparison_files'),
['proteus/tests/mesh_tests/comparison_files/poiseulle_xmf.output',
'proteus/tests/mesh_tests/comparison_files/poiseulle_global_xmf.output']),
(os.path.join(proteus_install_path,'tests','solver_tests_slow','comparison_files'),
['proteus/tests/solver_tests_slow/comparison_files/Qp_expected.log',
'proteus/tests/solver_tests_slow/comparison_files/drivenCavityStokes_expected.h5']),
(os.path.join(proteus_install_path,'tests','matrix_constructor','comparison_files'),
['proteus/tests/matrix_constructor/comparison_files/mass_reference_c0p1_2D.txt',
'proteus/tests/matrix_constructor/comparison_files/mass_reference_TH_2D.npy']),
(os.path.join(proteus_install_path,'tests','periodic','petsc'),
['proteus/tests/periodic/petsc/petsc.options.schur.selfp_petsc.amg',
'proteus/tests/periodic/petsc/petsc.options.schur.selfp_petsc.gamg.superlu',
'proteus/tests/periodic/petsc/petsc.options.schur.selfp_petsc.superlu']),
(os.path.join(proteus_install_path,'tests','periodic','comparison_files'),
['proteus/tests/periodic/comparison_files/basic_2d_test.h5',
'proteus/tests/periodic/comparison_files/basic_3d_test.h5']),
(os.path.join(proteus_install_path,'tests','post_processing','import_modules'),
['proteus/tests/post_processing/import_modules/reference_simplex_keep.ele',
'proteus/tests/post_processing/import_modules/reference_simplex_keep.face',
'proteus/tests/post_processing/import_modules/reference_simplex_keep.node',
'proteus/tests/post_processing/import_modules/reference_simplex_keep.poly',
'proteus/tests/post_processing/import_modules/bdm2_3d_face_func_vals.data',
'proteus/tests/post_processing/import_modules/bdm2_3d_interior_func_vals.data',
'proteus/tests/post_processing/import_modules/bdm_bdy_func_values_3dmesh.data',
'proteus/tests/post_processing/import_modules/bdm_func_values_3dmesh.data']),
(os.path.join(proteus_install_path,'tests','post_processing','comparison_files'),
['proteus/tests/post_processing/comparison_files/BDM_Test_File.h5',
'proteus/tests/post_processing/comparison_files/bdm2_ref_proj_mat.txt',
'proteus/tests/post_processing/comparison_files/bdm2_reference_simplex_mat.data',
'proteus/tests/post_processing/comparison_files/bdm2_reference_simplex_rhs.data',
'proteus/tests/post_processing/comparison_files/bdm_bdy_func_values.npy',
'proteus/tests/post_processing/comparison_files/bdm_bdy_func_values_mesh_8.npy',
'proteus/tests/post_processing/comparison_files/bdm_bdy_func_values_trig.npy',
'proteus/tests/post_processing/comparison_files/bdm_func_values.npy',
'proteus/tests/post_processing/comparison_files/bdm_func_values_mesh_8.npy',
'proteus/tests/post_processing/comparison_files/bdm_func_values_trig.npy',
'proteus/tests/post_processing/comparison_files/poisson_bdm1_test.h5',
'proteus/tests/post_processing/comparison_files/test_bdm2_sshaped_region_expected.h5',
'proteus/tests/post_processing/comparison_files/test_bdm_sshaped_region_expected.h5',
'proteus/tests/post_processing/comparison_files/trig_velocity_rep.npy']),
(os.path.join(proteus_install_path,'tests','matrix_constructor','comparison_files'),
['proteus/tests/matrix_constructor/comparison_files/velocity_laplace_C0P2_mesh.npy',
'proteus/tests/matrix_constructor/comparison_files/single_phase_THQuad_4_expected.data']),
(os.path.join(proteus_install_path,'tests','solver_tests_slow','comparison_files'),
['proteus/tests/solver_tests_slow/comparison_files/drivenCavityNSE_LSC_expected.h5',
'proteus/tests/solver_tests_slow/comparison_files/drivenCavityNSE_LSC_expected.xmf',
'proteus/tests/solver_tests_slow/comparison_files/drivenCavityNSE_LSC_expected.log']),
(os.path.join(proteus_install_path,'tests','solver_tests_slow','import_modules'),
['proteus/tests/solver_tests_slow/import_modules/petsc.options.schur_lsc']),
(os.path.join(proteus_install_path,'tests','solver_tests_mprans','comparison_files'),
['proteus/tests/solver_tests_mprans/comparison_files/twp_navier_stokes_cavity_2d.h5',
'proteus/tests/solver_tests_mprans/comparison_files/twp_navier_stokes_cavity_2d.xmf']),
(os.path.join(proteus_install_path,'tests','MeshAdaptPUMI'),
['proteus/tests/MeshAdaptPUMI/cube0.smb',
'proteus/tests/MeshAdaptPUMI/cube.dmg',
'proteus/tests/MeshAdaptPUMI/Couette.null',
'proteus/tests/MeshAdaptPUMI/Couette.msh',
'proteus/tests/MeshAdaptPUMI/Couette2D.msh',
'proteus/tests/MeshAdaptPUMI/Rectangle0.smb',
'proteus/tests/MeshAdaptPUMI/Rectangle1.smb',
'proteus/tests/MeshAdaptPUMI/Rectangle.dmg',
'proteus/tests/MeshAdaptPUMI/TwoQuads0.smb',
'proteus/tests/MeshAdaptPUMI/TwoQuads.dmg']),
(os.path.join(proteus_install_path,'tests','MeshAdaptPUMI','gauge_compare','dambreak_Colagrossi_2D'),
['proteus/tests/MeshAdaptPUMI/gauge_compare/dambreak_Colagrossi_2D/Reconstructed.dmg',
'proteus/tests/MeshAdaptPUMI/gauge_compare/dambreak_Colagrossi_2D/Reconstructed0.smb']),
(os.path.join(proteus_install_path,'tests','poisson_2d'),
['proteus/tests/poisson_2d/square4x4.3dm',
'proteus/tests/poisson_2d/square4x4.bc']),
(os.path.join(proteus_install_path,'tests','cylinder2D','conforming_rans3p','comparison_files'),
['proteus/tests/cylinder2D/conforming_rans3p/comparison_files/T1P1.h5',
'proteus/tests/cylinder2D/conforming_rans3p/comparison_files/T4P2.h5',
'proteus/tests/cylinder2D/conforming_rans3p/comparison_files/T8P2.h5']),
(os.path.join(proteus_install_path,'tests','cylinder2D','ibm_method','comparison_files'),
['proteus/tests/cylinder2D/ibm_method/comparison_files/T1_rans3p.h5']),
(os.path.join(proteus_install_path,'tests','cylinder2D','ibm_rans2p','comparison_files'),
['proteus/tests/cylinder2D/ibm_rans2p/comparison_files/T1_ibm_rans2p.h5']),
(os.path.join(proteus_install_path,'tests','cylinder2D','ibm_rans2p_3D','comparison_files'),
['proteus/tests/cylinder2D/ibm_rans2p_3D/comparison_files/T1_ibm_3D_rans2p.h5']),
(os.path.join(proteus_install_path,'tests','cylinder2D','sbm_method','comparison_files'),
['proteus/tests/cylinder2D/sbm_method/comparison_files/T1_sbm_rans3p.h5']),
(os.path.join(proteus_install_path,'tests','cylinder2D','sbm_3Dmesh','comparison_files'),
['proteus/tests/cylinder2D/sbm_3Dmesh/comparison_files/T001_P1_sbm_3Dmesh.h5']),
(os.path.join(proteus_install_path,'tests','cylinder2D','conforming_rans2p','comparison_files'),
['proteus/tests/cylinder2D/conforming_rans2p/comparison_files/T1_rans2p.h5']),
(os.path.join(proteus_install_path,'tests','HotStart_3P','comparison_files'),
['proteus/tests/HotStart_3P/comparison_files/T01P1_hotstart.h5',
'proteus/tests/HotStart_3P/comparison_files/T01P2_hotstart.h5']),
(os.path.join(proteus_install_path,'tests','AddedMass'),
['proteus/tests/AddedMass/petsc.options.superlu_dist']),
(os.path.join(proteus_install_path,'tests','MoveMeshMonitor'),
['proteus/tests/MoveMeshMonitor/petsc.options.asm',
'proteus/tests/MoveMeshMonitor/nodesResult.csv']),
(os.path.join(proteus_install_path,'tests','wave_tests'),
['proteus/tests/wave_tests/data_timeSeries.dat',
'proteus/tests/wave_tests/data_timeSeries.txt',
'proteus/tests/wave_tests/data_timeSeries_err1.csv',
'proteus/tests/wave_tests/data_timeSeries_err2.txt']),
],
scripts = ['scripts/parun','scripts/gf2poly','scripts/gatherArchives.py','scripts/qtm','scripts/waves2xmf','scripts/povgen.py',
'scripts/velocity2xmf','scripts/run_script_garnet','scripts/run_script_diamond',
'scripts/run_script_lonestar','scripts/run_script_ranger','scripts/run_script_mpiexec','scripts/gatherTimes.py','scripts/clearh5.py',
'scripts/runSWEs.py'],
requires=['numpy']
)
def setup_extensions_in_sequential():
setup_given_extensions(EXTENSIONS_TO_BUILD)
def setup_extensions_in_parallel():
import multiprocessing, logging
logger = multiprocessing.log_to_stderr()
logger.setLevel(logging.INFO)
multiprocessing.log_to_stderr()
pool = multiprocessing.Pool(processes=multiprocessing.cpu_count())
EXTENSIONS=[[e] for e in EXTENSIONS_TO_BUILD]
pool.imap(setup_given_extensions, EXTENSIONS)
pool.close()
pool.join()
if "build_ext" in sys.argv:
setup_extensions_in_parallel()
else:
setup_extensions_in_sequential()