-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
OpenFOAM-7-83cd285f0.patch
2784 lines (2582 loc) · 90.3 KB
/
OpenFOAM-7-83cd285f0.patch
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
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Allwmake | 5 +-
applications/Allwmake | 2 +
.../DelaunayMesh/DelaunayMesh.C | 7 +-
.../DelaunayMesh/DistributedDelaunayMesh.C | 7 +-
.../foamyMesh/conformalVoronoiMesh/Make/options | 1 +
.../generation/foamyMesh/foamyHexMesh/Make/options | 1 +
.../foamyMesh/foamyQuadMesh/Make/options | 1 +
.../foamyQuadMesh/insertSurfaceNearestPointPairs.C | 2 +-
.../mesh/generation/snappyHexMesh/Make/options | 1 -
.../mesh/manipulation/renumberMesh/Allwmake | 9 +-
.../mesh/manipulation/renumberMesh/Make/options | 1 -
.../postProcessing/graphics/PVReaders/Allwmake | 6 +
bin/foamMonitor | 15 ++-
bin/paraFoam | 6 +
bin/tools/RunFunctions | 3 +
etc/bashrc | 78 +++++++++---
etc/config.csh/CGAL | 5 +
etc/config.csh/mac/paraview | 13 ++
etc/config.csh/mpi | 7 +-
etc/config.csh/settings | 27 ++++-
etc/config.csh/unset | 36 ++++--
etc/config.sh/mac/CGAL | 69 +++++++++++
etc/config.sh/mac/functions | 134 +++++++++++++++++++++
etc/config.sh/mac/metis | 44 +++++++
etc/config.sh/mac/paraview | 18 +++
etc/config.sh/mac/scotch | 47 ++++++++
etc/config.sh/mpi | 5 +-
etc/config.sh/settings | 18 ++-
etc/config.sh/unset | 25 +++-
etc/cshrc | 59 +++++++--
src/Allwmake | 2 +
src/OSspecific/POSIX/POSIX.C | 33 +++++
src/OSspecific/POSIX/clockTime/clockTime.H | 3 +
src/OSspecific/POSIX/fileStat.C | 2 +
src/OSspecific/POSIX/printStack.C | 43 ++++++-
src/OSspecific/POSIX/signals/sigFpe.C | 79 +++++++++++-
src/OSspecific/POSIX/signals/sigFpe.H | 12 +-
src/OpenFOAM/Make/files | 2 +
src/OpenFOAM/containers/Lists/UList/UList.C | 5 +-
.../db/dynamicLibrary/dynamicCode/dynamicCode.C | 4 +
.../db/dynamicLibrary/dynamicCode/dynamicCode.H | 4 +
src/OpenFOAM/primitives/Scalar/doubleFloat.H | 40 ++++++
src/OpenFOAM/primitives/hashes/Hasher/Hasher.C | 2 +-
src/OpenFOAM/primitives/ints/int16/int16.C | 48 ++++++++
src/OpenFOAM/primitives/ints/int16/int16.H | 73 +++++++++++
src/OpenFOAM/primitives/ints/int64/int64.H | 5 +
src/OpenFOAM/primitives/ints/int64/int64IO.C | 12 ++
src/OpenFOAM/primitives/ints/uint/uint.H | 1 +
src/OpenFOAM/primitives/ints/uint16/uint16.C | 48 ++++++++
src/OpenFOAM/primitives/ints/uint16/uint16.H | 73 +++++++++++
src/OpenFOAM/primitives/ints/uint64/uint64.H | 4 +
src/OpenFOAM/primitives/ints/uint64/uint64IO.C | 8 ++
src/OpenFOAM/primitives/strings/word/wordIOList.C | 2 +-
src/fvAgglomerationMethods/Allwmake | 10 +-
.../MGridGenGamgAgglomeration/Make/options | 14 ++-
src/parallel/decompose/Allwmake | 5 +-
src/parallel/decompose/metisDecomp/Allwmake | 14 ++-
src/parallel/decompose/metisDecomp/Make/options | 1 -
src/parallel/decompose/ptscotchDecomp/Make/options | 16 +--
src/parallel/decompose/scotchDecomp/Make/options | 10 +-
src/renumber/SloanRenumber/Make/options | 14 ++-
.../basic/basicThermo/basicThermo.C | 2 +-
wmake/makefiles/files | 6 +-
wmake/makefiles/general | 4 +
wmake/rules/darwin64Clang/CGAL | 7 ++
wmake/rules/darwin64Clang/bison | 13 ++
wmake/rules/darwin64Clang/c | 23 ++++
wmake/rules/darwin64Clang/c++ | 35 ++++++
wmake/rules/darwin64Clang/c++Debug | 4 +
wmake/rules/darwin64Clang/c++Opt | 5 +
wmake/rules/darwin64Clang/c++Prof | 4 +
wmake/rules/darwin64Clang/cDebug | 4 +
wmake/rules/darwin64Clang/cOpt | 4 +
wmake/rules/darwin64Clang/cProf | 4 +
wmake/rules/darwin64Clang/flex | 5 +
wmake/rules/darwin64Clang/flex++ | 5 +
wmake/rules/darwin64Clang/general | 16 +++
wmake/rules/darwin64Clang/yacc | 13 ++
wmake/src/Makefile | 2 +
wmake/src/wmkdep.l | 1 +
wmake/wmake | 5 +
wmake/wmakeLnIncludeAll | 1 +
82 files changed, 1300 insertions(+), 104 deletions(-)
diff --git a/Allwmake b/Allwmake
index 3f6a7523d..00810aff6 100755
--- a/Allwmake
+++ b/Allwmake
@@ -12,11 +12,13 @@ wmakeCheckPwd "$WM_PROJECT_DIR" || {
exit 1
}
+[ "$(uname -s)" = "Darwin" ] || {
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Allwmake error: FOAM_EXT_LIBBIN not set"
echo " Check the OpenFOAM entries in your dot-files and source them."
exit 1
}
+}
# Compile wmake support applications
(cd wmake/src && make)
@@ -26,7 +28,8 @@ if [ -d "$WM_THIRD_PARTY_DIR" ]
then
$WM_THIRD_PARTY_DIR/Allwmake
else
- echo "Allwmake: no ThirdParty directory found - skipping"
+ [ "$(uname -s)" = "Darwin" ] \
+ || echo "Allwmake: no ThirdParty directory found - skipping"
fi
# Compile OpenFOAM libraries and applications
diff --git a/applications/Allwmake b/applications/Allwmake
index 2b725832b..8f96f6ec1 100755
--- a/applications/Allwmake
+++ b/applications/Allwmake
@@ -12,11 +12,13 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
exit 1
}
+[ "$(uname -s)" = "Darwin" ] || {
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Allwmake error: FOAM_EXT_LIBBIN not set"
echo " Check the OpenFOAM entries in your dot-files and source them."
exit 1
}
+}
wmake -all $targetType solvers
wmake -all $targetType utilities
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C
index 73a3323d3..7b1a6b466 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C
@@ -24,6 +24,9 @@ License
\*---------------------------------------------------------------------------*/
#include "DelaunayMesh.H"
+
+#include <random>
+
#include "labelPair.H"
#include "PrintTable.H"
#include "pointIOField.H"
@@ -302,7 +305,9 @@ Foam::Map<Foam::label> Foam::DelaunayMesh<Triangulation>::rangeInsertWithInfo
);
}
- std::random_shuffle(points.begin(), points.end());
+ std::random_device rng;
+ std::mt19937 urng(rng());
+ std::shuffle(points.begin(), points.end(), urng);
spatial_sort
(
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C
index 0b59e0ead..ddbf3c175 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C
@@ -24,6 +24,9 @@ License
\*---------------------------------------------------------------------------*/
#include "DistributedDelaunayMesh.H"
+
+#include <random>
+
#include "meshSearch.H"
#include "mapDistribute.H"
#include "zeroGradientFvPatchFields.H"
@@ -900,7 +903,9 @@ Foam::DistributedDelaunayMesh<Triangulation>::rangeInsertReferredWithInfo
);
}
- std::random_shuffle(pointsBbDistSqr.begin(), pointsBbDistSqr.end());
+ std::random_device rng;
+ std::mt19937 urng(rng());
+ std::shuffle(pointsBbDistSqr.begin(), pointsBbDistSqr.end(), urng);
// Sort in ascending order by the distance of the point from the centre
// of the processor bounding box
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/Make/options b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/Make/options
index 627614817..fc45a114e 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/Make/options
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/Make/options
@@ -5,6 +5,7 @@ CGAL_EXACT = /*-DCGAL_DONT_USE_LAZY_KERNEL*/
CGAL_INEXACT = -DCGAL_INEXACT
include $(GENERAL_RULES)/CGAL
+-include $(RULES)/CGAL
EXE_INC = \
${ROUNDING_MATH} \
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/Make/options b/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/Make/options
index ecf9cc2b3..5e067a79c 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/Make/options
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/Make/options
@@ -5,6 +5,7 @@ CGAL_EXACT = /*-DCGAL_DONT_USE_LAZY_KERNEL*/
CGAL_INEXACT = -DCGAL_INEXACT
include $(GENERAL_RULES)/CGAL
+-include $(RULES)/CGAL
EXE_INC = \
${ROUNDING_MATH} \
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/Make/options b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/Make/options
index 37dda1856..28ecb42c8 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/Make/options
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/Make/options
@@ -2,6 +2,7 @@ EXE_DEBUG = -DFULLDEBUG -g -O0
EXE_NDEBUG = -DNDEBUG
include $(GENERAL_RULES)/CGAL
+-include $(RULES)/CGAL
EXE_INC = \
${ROUNDING_MATH} \
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearestPointPairs.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearestPointPairs.C
index 3c761e03e..b3b4843bb 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearestPointPairs.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearestPointPairs.C
@@ -142,7 +142,7 @@ void Foam::CV2D::insertSurfaceNearestPointPairs()
Info<< "insertSurfaceNearestPointPairs: ";
label nSurfacePointsEst =
- min
+ std::min
(
number_of_vertices(),
size_t(10*sqrt(scalar(number_of_vertices())))
diff --git a/applications/utilities/mesh/generation/snappyHexMesh/Make/options b/applications/utilities/mesh/generation/snappyHexMesh/Make/options
index b50c6396e..0fa291c8e 100644
--- a/applications/utilities/mesh/generation/snappyHexMesh/Make/options
+++ b/applications/utilities/mesh/generation/snappyHexMesh/Make/options
@@ -1,5 +1,4 @@
EXE_INC = \
- /* -g -DFULLDEBUG -O0 */ \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/mesh/snappyHexMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
diff --git a/applications/utilities/mesh/manipulation/renumberMesh/Allwmake b/applications/utilities/mesh/manipulation/renumberMesh/Allwmake
index ee135cc37..1d3f69f2b 100755
--- a/applications/utilities/mesh/manipulation/renumberMesh/Allwmake
+++ b/applications/utilities/mesh/manipulation/renumberMesh/Allwmake
@@ -4,22 +4,29 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for compilation (at least for error catching)
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
+_soExt=so
+[ "$(uname -s)" = "Darwin" ] && _soExt=dylib
+
export COMPILE_FLAGS=''
export LINK_FLAGS=''
-if [ -f "${FOAM_LIBBIN}/libSloanRenumber.so" ]
+if [ -f "${FOAM_LIBBIN}/libSloanRenumber.$_soExt" ]
then
echo "Found libSloanRenumber.so -- enabling Sloan renumbering support."
export LINK_FLAGS="${LINK_FLAGS} -lSloanRenumber"
fi
+[ -n "$ZOLTAN_ARCH_PATH" ] && {
if [ -f "${ZOLTAN_ARCH_PATH}/lib/libzoltan.a" -a -f "${FOAM_LIBBIN}/libzoltanRenumber.so" ]
then
echo "Found libzoltanRenumber.so -- enabling zoltan renumbering support."
export COMPILE_FLAGS="-DFOAM_USE_ZOLTAN"
export LINK_FLAGS="${LINK_FLAGS} -lzoltanRenumber -L${ZOLTAN_ARCH_PATH}/lib -lzoltan"
fi
+}
wmake $targetType
+unset _soExt
+
#------------------------------------------------------------------------------
diff --git a/applications/utilities/mesh/manipulation/renumberMesh/Make/options b/applications/utilities/mesh/manipulation/renumberMesh/Make/options
index ef0651050..720011d74 100644
--- a/applications/utilities/mesh/manipulation/renumberMesh/Make/options
+++ b/applications/utilities/mesh/manipulation/renumberMesh/Make/options
@@ -1,5 +1,4 @@
EXE_INC = \
- /* -DFULLDEBUG -g -O0 */ \
${COMPILE_FLAGS} \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/Allwmake b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake
index 12b467924..17f3fd8b0 100755
--- a/applications/utilities/postProcessing/graphics/PVReaders/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake
@@ -4,6 +4,12 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
+if [ "$(uname -s)" = "Darwin" ]
+then
+ echo "Skipping PVReaders on macOS"
+ exit 0
+fi
+
case "$ParaView_VERSION" in
4* | 5*)
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
diff --git a/bin/foamMonitor b/bin/foamMonitor
index e52747b37..5b8a816c7 100755
--- a/bin/foamMonitor
+++ b/bin/foamMonitor
@@ -64,9 +64,14 @@ error() {
plotFileHeader() {
cat<<EOF
-set term $gpterminal $size
+selected_terminal = 'x11'
+for [t in "wxt qt"] if (strstrt(GPVAL_TERMINALS, t)) selected_terminal = t
+set term selected_terminal $gpterminal $size
$logscale
+$explabels
$yrange
+set size ratio 0.62111801242236
+set grid
set ytics format "$yticFormat"
set title "$title"
set xlabel "$xlabel"
@@ -92,13 +97,16 @@ isInteger() {
idle=60
refresh=10
logscale=""
+explabels=""
yrange=""
yticFormat="%g"
title="Data Monitoring"
size=""
-gpterminal='x11 1 font "helvetica,17" linewidth 1.5 persist noraise'
+gpterminal='1 font "helvetica,17" linewidth 1.5 persist noraise'
command -v gnuplot >/dev/null 2>&1 || error "Gnuplot not installed"
+STAT="stat --format=%Y"
+[ "$(uname -s)" = "Darwin" ] && STAT="stat -f %m"
# parse options
while [ "$#" -gt 0 ]
@@ -114,6 +122,7 @@ do
;;
-l | -logscale)
logscale="set logscale y"
+ explabels='set format y "%.1g"'
yticFormat="%1.e"
shift 1
;;
@@ -202,7 +211,7 @@ pid=$!
while true
do
- mod_time=$(stat --format=%Y "$file")
+ mod_time=$($STAT "$file")
idle_ago=$(( $(date +%s) - idle ))
test "$mod_time" -gt "$idle_ago" || break
sleep "$refresh"
diff --git a/bin/paraFoam b/bin/paraFoam
index cfd483da9..996464e6b 100755
--- a/bin/paraFoam
+++ b/bin/paraFoam
@@ -99,6 +99,12 @@ extension=OpenFOAM
requirePV=1
+if [ "$(uname -s)" = "Darwin" ]
+then
+ extension=foam
+ requirePV=0
+fi
+
# Parse options
while [ "$#" -gt 0 ]
do
diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions
index 02c1b174c..0af9b69aa 100644
--- a/bin/tools/RunFunctions
+++ b/bin/tools/RunFunctions
@@ -28,6 +28,9 @@
# Miscellaneous functions for running tutorial cases
#------------------------------------------------------------------------------
+[ -z "$DYLD_LIBRARY_PATH" -a -n "$FOAM_DYLD_LIBRARY_PATH" ] \
+ && export DYLD_LIBRARY_PATH="$FOAM_DYLD_LIBRARY_PATH"
+
isTest()
{
for i in "$@"; do
diff --git a/etc/bashrc b/etc/bashrc
index 19061dcc3..996b1e3d7 100644
--- a/etc/bashrc
+++ b/etc/bashrc
@@ -52,6 +52,16 @@ export FOAM_INST_DIR=$HOME/$WM_PROJECT
# END OF (NORMAL) USER EDITABLE PART
################################################################################
+_foam_on_macos()
+{
+ if [ "$(uname -s)" = "Darwin" ]
+ then
+ return 0
+ else
+ return 1
+ fi
+}
+
# The default environment variables below can be overridden in a prefs.sh file
# located in ~/.OpenFOAM/$WM_PROJECT_VERSION, ~/.OpenFOAM,
# $FOAM_INST_DIR/site/$WM_PROJECT_VERSION or $FOAM_INST_DIR/site
@@ -62,7 +72,7 @@ export WM_COMPILER_TYPE=system
#- Compiler:
# WM_COMPILER = Gcc | Gcc48 ... Gcc62 | Clang | Icc
-export WM_COMPILER=Gcc
+export WM_COMPILER=Clang
unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH
#- Memory addressing:
@@ -115,7 +125,8 @@ export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
# Location of third-party software
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
+_foam_on_macos \
+ || export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
# Location of site-specific templates etc
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -135,8 +146,10 @@ export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. $WM_PROJECT_DIR/etc/config.sh/functions
+_foam_on_macos && . $WM_PROJECT_DIR/etc/config.sh/mac/functions
+
# Add in preset user or site preferences:
-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh`
+_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile prefs.sh)
# Evaluate command-line parameters and record settings for later
# these can be used to set/unset values, or specify alternative pref files
@@ -148,16 +161,27 @@ _foamEval $@
foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
#- Clean PATH
-cleaned=`$foamClean "$PATH" "$foamOldDirs"` && PATH="$cleaned"
+cleaned=$($foamClean "$PATH" "$foamOldDirs") && PATH="$cleaned"
-#- Clean LD_LIBRARY_PATH
-cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"` \
- && LD_LIBRARY_PATH="$cleaned"
+if _foam_on_macos
+then
+ #- Clean DYLD_LIBRARY_PATH on macOS
+ cleaned=$($foamClean "$DYLD_LIBRARY_PATH" "$foamOldDirs") \
+ && DYLD_LIBRARY_PATH="$cleaned"
+ export DYLD_LIBRARY_PATH
+ FOAM_DYLD_LIBRARY_PATH="$DYDL_LIBRARY_PATH"
+ export FOAM_DYLD_LIBRARY_PATH
+else
+ #- Clean LD_LIBRARY_PATH
+ cleaned=$($foamClean "$LD_LIBRARY_PATH" "$foamOldDirs") \
+ && LD_LIBRARY_PATH="$cleaned"
+ export LD_LIBRARY_PATH
+fi
#- Clean MANPATH
-cleaned=`$foamClean "$MANPATH" "$foamOldDirs"` && MANPATH="$cleaned"
+cleaned=$($foamClean "$MANPATH" "$foamOldDirs") && MANPATH="$cleaned"
-export PATH LD_LIBRARY_PATH MANPATH
+export PATH MANPATH
# Source project setup files
@@ -169,13 +193,23 @@ _foamSource $WM_PROJECT_DIR/etc/config.sh/aliases
# Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/mpi`
-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview`
-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/ensight`
-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/gperftools`
+if _foam_on_macos
+then
+ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/mac/paraview`
+else
+ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview`
+ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/ensight`
+ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/gperftools`
+fi
if [ ! -z "$FOAMY_HEX_MESH" ]
then
- _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL`
+ if _foam_on_macos
+ then
+ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/mac/CGAL`
+ else
+ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL`
+ fi
fi
@@ -184,13 +218,23 @@ fi
#- Clean PATH
cleaned=`$foamClean "$PATH"` && PATH="$cleaned"
-#- Clean LD_LIBRARY_PATH
-cleaned=`$foamClean "$LD_LIBRARY_PATH"` && LD_LIBRARY_PATH="$cleaned"
+if _foam_on_macos
+then
+ #- Clean DYLD_LIBRARY_PATH
+ cleaned=`$foamClean "$DYLD_LIBRARY_PATH"` && DYLD_LIBRARY_PATH="$cleaned"
+ export DYLD_LIBRARY_PATH
+ FOAM_DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH"
+ export FOAM_DYLD_LIBRARY_PATH
+else
+ #- Clean LD_LIBRARY_PATH
+ cleaned=`$foamClean "$LD_LIBRARY_PATH"` && LD_LIBRARY_PATH="$cleaned"
+ export LD_LIBRARY_PATH
+fi
#- Clean MANPATH (trailing ':' to find system pages)
cleaned=`$foamClean "$MANPATH"`: && MANPATH="$cleaned"
-export PATH LD_LIBRARY_PATH MANPATH
+export PATH MANPATH
#- Clean LD_PRELOAD
if [ -n "$LD_PRELOAD" ]
@@ -209,6 +253,8 @@ unset cleaned foamClean foamOldDirs
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. $WM_PROJECT_DIR/etc/config.sh/functions
+_foam_on_macos && . $WM_PROJECT_DIR/etc/config.sh/mac/functions
+
# Source the bash completion file:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ "$BASH" ] && . $WM_PROJECT_DIR/etc/config.sh/bash_completion
diff --git a/etc/config.csh/CGAL b/etc/config.csh/CGAL
index 7b74f544c..811247a39 100644
--- a/etc/config.csh/CGAL
+++ b/etc/config.csh/CGAL
@@ -40,8 +40,13 @@ set boost_version=boost-system
set cgal_version=cgal-system
#cgal_version=CGAL-4.10
+if ($?WM_THIRD_PARTY_DIR) then
setenv BOOST_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version
setenv CGAL_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version
+else
+setenv BOOST_ARCH_PATH ''
+setenv CGAL_ARCH_PATH ''
+endif
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using CGAL and boost"
diff --git a/etc/config.csh/mac/paraview b/etc/config.csh/mac/paraview
new file mode 100644
index 000000000..53adbcca5
--- /dev/null
+++ b/etc/config.csh/mac/paraview
@@ -0,0 +1,13 @@
+set _paraview = /Applications/[Pp][Aa][Rr][Aa][Vv][Ii][Ee][Ww]*.app
+if ( -d $_paraview ) then
+ if ( $?prompt ) echo Using $_paraview
+ alias paraview "$_paraview/Contents/MacOS/paraview"
+else
+ echo
+ echo "Please download binary Paraview release from"
+ echo "http://paraview.org and install it in /Applications"
+ echo "folder."
+ echo
+endif
+
+#----------------------------- vi: set ft=csh et: ----------------------------
diff --git a/etc/config.csh/mpi b/etc/config.csh/mpi
index 78b14e474..db7040a51 100644
--- a/etc/config.csh/mpi
+++ b/etc/config.csh/mpi
@@ -262,7 +262,10 @@ endsw
# Add (non-dummy) MPI implementation
# Dummy MPI already added to LD_LIBRARY_PATH and has no external libraries
if ( "$FOAM_MPI" != dummy ) then
- _foamAddLib ${FOAM_LIBBIN}/${FOAM_MPI}:${FOAM_EXT_LIBBIN}/${FOAM_MPI}
+ if ($?FOAM_EXT_LIBBIN) then
+ _foamAddLib :${FOAM_EXT_LIBBIN}/${FOAM_MPI}
+ endif
+ _foamAddLib ${FOAM_LIBBIN}/${FOAM_MPI}
endif
@@ -279,4 +282,4 @@ else
setenv MPI_BUFFER_SIZE $minBufferSize
endif
-#------------------------------------------------------------------------------
+#-------------------- vi: set ft=tcsh et sw=4 ts=4 sts=4: ---------------------
diff --git a/etc/config.csh/settings b/etc/config.csh/settings
index a68110918..bcf2655b3 100644
--- a/etc/config.csh/settings
+++ b/etc/config.csh/settings
@@ -32,8 +32,12 @@
# Prefix to PATH
alias _foamAddPath 'setenv PATH \!*\:${PATH}'
-# Prefix to LD_LIBRARY_PATH
-alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'
+# Prefix to [FOAM_][DY]LD_LIBRARY_PATH
+if ($foamDarwin) then
+ alias _foamAddLib 'setenv FOAM_DYLD_LIBRARY_PATH \!*\:${FOAM_DYLD_LIBRARY_PATH}; setenv DYLD_LIBRARY_PATH \!*\:${DYLD_LIBRARY_PATH}'
+else
+ alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'
+endif
# Prefix to MANPATH
alias _foamAddMan 'setenv MANPATH \!*\:${MANPATH}'
@@ -119,6 +123,13 @@ case SunOS:
setenv WM_LDFLAGS '-mabi=64 -G0'
breaksw
+case Darwin:
+ setenv WM_ARCH darwin64
+ setenv WM_COMPILER_LIB_ARCH 64
+ setenv WM_CC 'clang'
+ setenv WM_CXX 'clang++'
+ breaksw
+
default:
echo
echo "Your '$WM_ARCH' operating system is not supported by this release"
@@ -145,7 +156,9 @@ setenv FOAM_APPBIN $WM_PROJECT_DIR/platforms/$WM_OPTIONS/bin
setenv FOAM_LIBBIN $WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib
# External (ThirdParty) libraries
-setenv FOAM_EXT_LIBBIN $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/lib
+if (${?WM_THIRD_PARTY_DIR}) then
+ setenv FOAM_EXT_LIBBIN $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/lib
+endif
# Site-specific directory
if ( $?WM_PROJECT_SITE ) then
@@ -192,7 +205,11 @@ unset siteDir
_foamAddPath ${FOAM_USER_APPBIN}:${FOAM_SITE_APPBIN}:${FOAM_APPBIN}
# Make sure to pick up dummy versions of external libraries last
-_foamAddLib ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}:${FOAM_EXT_LIBBIN}:${FOAM_LIBBIN}/dummy
+_foamAddLib ${FOAM_LIBBIN}/dummy
+if (${?FOAM_EXT_LIBBIN}) then
+ _foamAddLib ${FOAM_EXT_LIBBIN}
+endif
+_foamAddLib ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}
# Compiler settings
# ~~~~~~~~~~~~~~~~~
@@ -331,4 +348,4 @@ endsw
unset minBufferSize
unsetenv WM_COMPILER_TYPE
-#------------------------------------------------------------------------------
+#-------------------- vi: set ft=tcsh et sw=4 ts=4 sts=4: ---------------------
diff --git a/etc/config.csh/unset b/etc/config.csh/unset
index 6e4a95e92..1d2166bcf 100644
--- a/etc/config.csh/unset
+++ b/etc/config.csh/unset
@@ -29,6 +29,8 @@
#
#------------------------------------------------------------------------------
+@ foamDarwin = (`uname -s` == "Darwin")
+
# Clean standard environment variables (PATH, LD_LIBRARY_PATH, MANPATH)
unset foamClean
@@ -38,7 +40,10 @@ if ( $?WM_PROJECT_DIR ) then
endif
# The old dirs to be cleaned from the environment variables
-set foamOldDirs="$WM_PROJECT_DIR $WM_THIRD_PARTY_DIR $HOME/$WM_PROJECT/$LOGNAME $FOAM_SITE_APPBIN $FOAM_SITE_LIBBIN"
+set foamOldDirs="$WM_PROJECT_DIR $HOME/$WM_PROJECT/$LOGNAME $FOAM_SITE_APPBIN $FOAM_SITE_LIBBIN"
+if ( ${?WM_THIRD_PARTY_DIR} ) then
+ set foamOldDirs="$foamOldDirs $WM_THIRD_PARTY_DIR"
+endif
if ( $?WM_PROJECT_SITE ) then
set foamOldDirs="$foamOldDirs $WM_PROJECT_SITE"
endif
@@ -55,6 +60,7 @@ unsetenv WM_ARCH_OPTION
unsetenv WM_CC
unsetenv WM_CFLAGS
unsetenv WM_COMPILER
+unsetenv WM_COMPILER_ARCH
unsetenv WM_COMPILER_TYPE
unsetenv WM_COMPILER_LIB_ARCH
unsetenv WM_COMPILE_OPTION
@@ -78,7 +84,8 @@ unsetenv WM_PROJECT_SITE
unsetenv WM_PROJECT_USER_DIR
unsetenv WM_PROJECT_VERSION
unsetenv WM_SCHEDULER
-unsetenv WM_THIRD_PARTY_DIR
+if ($?WM_THIRD_PARTY_DIR) \
+ unsetenv WM_THIRD_PARTY_DIR
#------------------------------------------------------------------------------
@@ -144,11 +151,21 @@ if ( $?foamClean ) then
set cleaned=`$foamClean "$PATH" "$foamOldDirs"`
if ( $status == 0 ) setenv PATH $cleaned
- if ($?LD_LIBRARY_PATH) then
- set cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"`
- if ( $status == 0 ) setenv LD_LIBRARY_PATH $cleaned
-
- if ( ${%LD_LIBRARY_PATH} == 0 ) unsetenv LD_LIBRARY_PATH
+ if ($foamDarwin) then
+ if ($?FOAM_DYLD_LIBRARY_PATH) then
+ set cleaned=`$foamClean "$FOAM_DYLD_LIBRARY_PATH" "$foamOldDirs"`
+ if ( $status == 0 ) setenv DYLD_LIBRARY_PATH $cleaned
+
+ if ( ${%DYLD_LIBRARY_PATH} == 0 ) unsetenv DYLD_LIBRARY_PATH
+ unsetenv FOAM_DYLD_LIBRARY_PATH
+ endif
+ else
+ if ($?LD_LIBRARY_PATH) then
+ set cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"`
+ if ( $status == 0 ) setenv LD_LIBRARY_PATH $cleaned
+
+ if ( ${%LD_LIBRARY_PATH} == 0 ) unsetenv LD_LIBRARY_PATH
+ endif
endif
if ($?MANPATH) then
@@ -161,7 +178,7 @@ if ( $?foamClean ) then
endif
-unset cleaned foamClean foamOldDirs
+unset cleaned foamClean foamOldDirs foamDarwin
#------------------------------------------------------------------------------
# Cleanup aliases
@@ -171,6 +188,7 @@ unalias wm64
unalias wm32
unalias wmSP
unalias wmDP
+unalias wmLP
unalias wmRefresh
unalias wmUnset
@@ -193,4 +211,4 @@ unalias foamVersion
unalias foamPV
-#------------------------------------------------------------------------------
+#-------------------- vi: set ft=tcsh et sw=4 ts=4 sts=4: ---------------------
diff --git a/etc/config.sh/mac/CGAL b/etc/config.sh/mac/CGAL
new file mode 100644
index 000000000..3e5304369
--- /dev/null
+++ b/etc/config.sh/mac/CGAL
@@ -0,0 +1,69 @@
+# CGAL configuration for OS X
+
+if [ -n "$SOURCE_CGAL_VERSIONS_ONLY" ]
+then
+ . $WM_PROJECT_DIR/etc/config.sh/mac/functions
+ if [ "x$(_foamBrew)" = "xY" ]
+ then
+ _prefix=$(_foamBrewPrefix)
+ boost_version="boost-$(_foamGetPackageVersion boost)"
+ export BOOST_ARCH_PATH="$_prefix/opt/boost"
+ unset _prefix
+ elif [ "x$(_foamPort)" = "xY" ]
+ then
+ _prefix=$(_foamPortPrefix)
+ boost_version=$(_foamGetPackageVersion boost)
+ export BOOST_ARCH_PATH="$_prefix"
+ unset _prefix
+ else
+ boost_version=boost-unknown
+ export BOOST_ARCH_PATH=/usr/local
+ fi
+ unset boost_version
+ . $WM_PROJECT_DIR/etc/config.sh/mac/functions
+else
+ if [ "x$(_foamBrew)" = "xY" ]
+ then
+ _prefix=$(_foamBrewPrefix)
+
+ boost_version="boost-$(_foamGetPackageVersion boost)"
+ cgal_version="CGAL-$(_foamGetPackageVersion cgal)"
+
+ export BOOST_ARCH_PATH="$_prefix/opt/boost"
+ export CGAL_ARCH_PATH="$_prefix/opt/cgal"
+ export GMP_ARCH_PATH="$_prefix/opt/gmp"
+ export MPFR_ARCH_PATH="$_prefix/opt/mpfr"
+
+ unset _prefix
+ elif [ "x$(_foamPort)" = "xY" ]
+ then
+ _prefix=$(_foamPortPrefix)
+
+ boost_version=$(_foamGetPackageVersion boost)
+ cgal_version=$(_foamGetPackageVersion cgal)
+
+ export BOOST_ARCH_PATH="$_prefix"
+ export CGAL_ARCH_PATH="$_prefix"
+ export GMP_ARCH_PATH="$_prefix"
+ export MPFR_ARCH_PATH="$_prefix"
+
+ unset _prefix
+ else
+ boost_version=boost-unknown
+ cgal_version=CGAL-unknown
+
+ export BOOST_ARCH_PATH=/usr/local
+ export CGAL_ARCH_PATH=/usr/local
+ fi
+
+ if [ "$FOAM_VERBOSE" -a "$PS1" ]
+ then
+ echo "Using CGAL and boost" 1>&2
+ echo " $cgal_version at $CGAL_ARCH_PATH" 1>&2
+ echo " $boost_version at $BOOST_ARCH_PATH" 1>&2
+ fi
+ unset boost_version cgal_version
+fi
+
+
+# vim: set ft=sh:
diff --git a/etc/config.sh/mac/functions b/etc/config.sh/mac/functions
new file mode 100644
index 000000000..f2a5d841e
--- /dev/null
+++ b/etc/config.sh/mac/functions
@@ -0,0 +1,134 @@
+# Additional functions for OS X
+
+if [ -z "$WM_BASH_FUNCTIONS_MAC" ]
+then
+ WM_BASH_FUNCTIONS_MAC=loaded
+
+ # Prefix to DYLD_LIBRARY_PATH and FOAM_DYLD_LIBRARY_PATH
+ _foamAddLib ()
+ {
+ while [ $# -ge 1 ]
+ do
+ export DYLD_LIBRARY_PATH=$1:$DYLD_LIBRARY_PATH
+ export FOAM_DYLD_LIBRARY_PATH=$1:$FOAM_DYLD_LIBRARY_PATH
+ shift
+ done
+ }
+
+ _foamBrew ()
+ {
+ if $(which -s brew)
+ then
+ echo Y
+ return 0
+ else
+ echo N
+ return 1
+ fi
+ }
+
+ _foamPort ()
+ {
+ if $(which -s port)
+ then
+ echo Y
+ return 0
+ else
+ echo N
+ return 1
+ fi
+ }
+
+ _foamPortPrefix ()
+ {
+ echo "$(dirname $(dirname $(which port)))"
+ }
+
+ _foamBrewPrefix ()
+ {
+ echo $(brew --prefix)
+ }
+
+ _foamGetPackageVersion ()
+ {
+ local version="?"
+ local ret=0
+ local pkg="$1"
+
+ if [ "x$(_foamBrew)" = "xY" ]
+ then
+ local prefix="$(_foamBrewPrefix)"
+ if [ -d "$prefix/opt/${pkg}64" -a "$WM_LABEL_SIZE" -eq 64 ]
+ then
+ version="$(basename $(readlink "$prefix/opt/${pkg}64"))"
+ elif [ -d "$prefix/opt/$pkg" ]
+ then
+ version="$(basename $(readlink "$prefix/opt/$pkg"))"
+ else
+ ret=1
+ fi
+ elif [ "x$(_foamPort)" = "xY" ]
+ then
+ version="0.0.x"
+ else
+ ret=1
+ fi
+ echo $version
+ return $ret
+ }
+
+ _foamGetPackageArchPath ()
+ {
+ local arch_path="/usr/local"
+ local ret=0
+ local pkg="$1"
+ if [ "x$(_foamBrew)" = "xY" ]
+ then
+ local prefix="$(_foamBrewPrefix)"
+ if [ -d "$prefix/opt/${pkg}64" -a "$WM_LABEL_SIZE" -eq 64 ]
+ then
+ arch_path="$prefix/opt/${pkg}64"
+ elif [ -d "$prefix/opt/$pkg" ]
+ then
+ arch_path="$prefix/opt/$pkg"
+ else
+ ret=1
+ fi
+ elif [ "x$(_foamPort)" = "xY" ]
+ then
+ arch_path="$(_foamPortPrefix)"
+ else
+ ret=1
+ fi
+ echo $arch_path
+ return $ret
+ }
+
+ _foam_increase_max_open_files ()
+ {
+ # Default value
+ local lim=4096
+
+ # Reset if parameter passed
+ [ -n "$1" ] && lim="$1"
+
+ # Silencing the errors
+ local current_limit=$(ulimit -n)
+ if [ "$current_limit" = "unlimited" ]
+ then
+ return 0
+ elif [ "$current_limit" -lt "$lim" ]
+ then
+ ulimit -n "$lim" > /dev/null 2>&1
+ return 0
+ fi
+ return 0
+ }
+else
+ unset WM_BASH_FUNCTIONS_MAC
+ unset _foamAddLib _foamBrew _foamPort _foamPortPrefix _foamBrewPrefix \
+ _foamGetPackageVersion _foamGetPackageArchPath \
+ _foam_increase_max_open_files
+fi
+
+# vim: set ft=sh:
diff --git a/etc/config.sh/mac/metis b/etc/config.sh/mac/metis
new file mode 100644
index 000000000..bb87346f7
--- /dev/null
+++ b/etc/config.sh/mac/metis
@@ -0,0 +1,44 @@
+#----------------------------------*-sh-*--------------------------------------
+# ========= |
+# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+# \\ / O peration |
+# \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
+# \\/ M anipulation |
+#------------------------------------------------------------------------------
+# License
+# This file is part of OpenFOAM.
+#
+# OpenFOAM is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
+#
+# File
+# etc/config.sh/metis
+#
+# Description