-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
OpenFOAM-5.x-7f7d351b7.patch
4128 lines (3889 loc) · 131 KB
/
OpenFOAM-5.x-7f7d351b7.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 +
.../CGALTriangulation3DKernel.H | 3 +
.../generation/foamyMesh/foamyHexMesh/Make/options | 1 +
.../mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C | 4 +-
.../mesh/generation/foamyMesh/foamyQuadMesh/CV2D.H | 6 +-
.../generation/foamyMesh/foamyQuadMesh/CV2DI.H | 6 +-
.../generation/foamyMesh/foamyQuadMesh/CV2DIO.C | 4 +-
.../foamyMesh/foamyQuadMesh/Make/options | 1 +
.../insertBoundaryConformPointPairs.C | 2 +-
.../foamyMesh/foamyQuadMesh/insertFeaturePoints.C | 4 +-
.../foamyQuadMesh/insertSurfaceNearestPointPairs.C | 4 +-
.../mesh/generation/snappyHexMesh/Make/options | 1 -
.../mesh/manipulation/renumberMesh/Allwmake | 9 +-
.../mesh/manipulation/renumberMesh/Make/options | 1 -
applications/utilities/miscellaneous/Allwmake | 16 ++
.../utilities/miscellaneous/addr2line/Make/files | 3 +
.../utilities/miscellaneous/addr2line/Make/options | 3 +
.../utilities/miscellaneous/addr2line/addr2line.C | 165 +++++++++++++++++++++
.../postProcessing/graphics/PVReaders/Allwmake | 6 +
bin/foamMonitor | 15 +-
bin/paraFoam | 6 +
bin/tools/RunFunctions | 5 +-
etc/bashrc | 70 +++++++--
etc/config.csh/mac/paraview | 13 ++
etc/config.csh/mpi | 2 +-
etc/config.csh/paraview | 2 +-
etc/config.csh/settings | 27 +++-
etc/config.csh/unset | 27 +++-
etc/config.sh/mac/CGAL | 69 +++++++++
etc/config.sh/mac/functions | 137 +++++++++++++++++
etc/config.sh/mac/metis | 44 ++++++
etc/config.sh/mac/paraview | 18 +++
etc/config.sh/mac/scotch | 47 ++++++
etc/config.sh/metis | 4 +-
etc/config.sh/mpi | 5 +-
etc/config.sh/scotch | 6 +-
etc/config.sh/settings | 15 +-
etc/config.sh/unset | 23 ++-
etc/cshrc | 61 ++++++--
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 | 30 ++--
src/OSspecific/POSIX/signals/sigFpe.C | 79 +++++++++-
src/OSspecific/POSIX/signals/sigFpe.H | 12 +-
src/OpenFOAM/Make/files | 10 ++
src/OpenFOAM/containers/Lists/UList/UList.C | 5 +-
src/OpenFOAM/db/IOstreams/IOstreams.H | 4 +
.../db/dynamicLibrary/dynamicCode/dynamicCode.C | 4 +
.../db/dynamicLibrary/dynamicCode/dynamicCode.H | 4 +
.../collatedFileOperation/OFstreamCollator.C | 2 +-
src/OpenFOAM/primitives/Scalar/doubleFloat.H | 15 ++
src/OpenFOAM/primitives/ints/int/int.H | 11 ++
src/OpenFOAM/primitives/ints/long/long.C | 50 +++++++
src/OpenFOAM/primitives/ints/long/long.H | 138 +++++++++++++++++
src/OpenFOAM/primitives/ints/long/longIO.C | 104 +++++++++++++
src/OpenFOAM/primitives/ints/short/short.C | 50 +++++++
src/OpenFOAM/primitives/ints/short/short.H | 138 +++++++++++++++++
src/OpenFOAM/primitives/ints/short/shortIO.C | 104 +++++++++++++
src/OpenFOAM/primitives/ints/ulong/ulong.C | 52 +++++++
src/OpenFOAM/primitives/ints/ulong/ulong.H | 138 +++++++++++++++++
src/OpenFOAM/primitives/ints/ulong/ulongIO.C | 101 +++++++++++++
src/OpenFOAM/primitives/ints/ushort/ushort.C | 52 +++++++
src/OpenFOAM/primitives/ints/ushort/ushort.H | 138 +++++++++++++++++
src/OpenFOAM/primitives/ints/ushort/ushortIO.C | 101 +++++++++++++
.../CrankNicolsonDdtScheme.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/metisDecomp/metisDecomp.C | 66 +++++++--
src/parallel/decompose/ptscotchDecomp/Make/options | 11 +-
src/parallel/decompose/scotchDecomp/Make/options | 10 +-
src/renumber/SloanRenumber/Make/options | 14 +-
.../laminar/helmholtzResonance/Allrun | 4 +-
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 | 2 +-
wmake/wmake | 5 +
100 files changed, 2413 insertions(+), 138 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 1a91712f1..016e865d8 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 c620bea28..d7a4de4d1 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/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H
index cdafc7ab5..6e0afaf6e 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H
@@ -33,6 +33,9 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+#if defined(darwin64)
+#include <type_traits>
+#endif
#include "CGAL/Delaunay_triangulation_3.h"
#ifdef CGAL_INEXACT
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/CV2D.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C
index 92d08f29d..ee58bed3d 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C
@@ -150,7 +150,7 @@ Foam::CV2D::CV2D
),
z_
(
- point
+ Foam::point
(
cvMeshDict.subDict("surfaceConformation").lookup("locationInMesh")
).z()
@@ -260,7 +260,7 @@ void Foam::CV2D::insertGrid()
{
for (int j=0; j<nj; j++)
{
- point p(x0 + i*deltax, y0 + j*deltay, 0);
+ Foam::point p(x0 + i*deltax, y0 + j*deltay, 0);
if (meshControls().randomiseInitialGrid())
{
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.H b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.H
index 6bbe59b93..84d988675 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.H
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.H
@@ -347,9 +347,9 @@ public:
// Conversion functions between point2D, point and Point
- inline const point2D& toPoint2D(const point&) const;
+ inline const point2D& toPoint2D(const Foam::point&) const;
inline const point2DField toPoint2D(const pointField&) const;
- inline point toPoint3D(const point2D&) const;
+ inline Foam::point toPoint3D(const point2D&) const;
#ifdef CGAL_INEXACT
typedef const point2D& point2DFromPoint;
@@ -361,7 +361,7 @@ public:
inline point2DFromPoint toPoint2D(const Point&) const;
inline PointFromPoint2D toPoint(const point2D&) const;
- inline point toPoint3D(const Point&) const;
+ inline Foam::point toPoint3D(const Point&) const;
// Point insertion
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H
index e2720cc5e..5f848212d 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H
@@ -121,7 +121,7 @@ inline const Foam::cv2DControls& Foam::CV2D::meshControls() const
}
-inline const Foam::point2D& Foam::CV2D::toPoint2D(const point& p) const
+inline const Foam::point2D& Foam::CV2D::toPoint2D(const Foam::point& p) const
{
return reinterpret_cast<const point2D&>(p);
}
@@ -140,7 +140,7 @@ inline const Foam::point2DField Foam::CV2D::toPoint2D(const pointField& p) const
inline Foam::point Foam::CV2D::toPoint3D(const point2D& p) const
{
- return point(p.x(), p.y(), z_);
+ return Foam::point(p.x(), p.y(), z_);
}
@@ -175,7 +175,7 @@ inline Foam::CV2D::PointFromPoint2D Foam::CV2D::toPoint(const point2D& p) const
inline Foam::point Foam::CV2D::toPoint3D(const Point& P) const
{
- return point(CGAL::to_double(P.x()), CGAL::to_double(P.y()), z_);
+ return Foam::point(CGAL::to_double(P.x()), CGAL::to_double(P.y()), z_);
}
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.C
index d370880ae..b8e8518eb 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.C
@@ -210,8 +210,8 @@ void Foam::CV2D::extractPatches
|| (vB->internalOrBoundaryPoint() && !vA->internalOrBoundaryPoint())
)
{
- point ptA = toPoint3D(vA->point());
- point ptB = toPoint3D(vB->point());
+ Foam::point ptA = toPoint3D(vA->point());
+ Foam::point ptB = toPoint3D(vB->point());
label patchIndex = qSurf_.findPatch(ptA, ptB);
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/insertBoundaryConformPointPairs.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertBoundaryConformPointPairs.C
index 0f6926850..3017c72a9 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertBoundaryConformPointPairs.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertBoundaryConformPointPairs.C
@@ -295,7 +295,7 @@ void Foam::CV2D::markNearBoundaryPoints()
{
if (vit->internalPoint())
{
- point vert(toPoint3D(vit->point()));
+ Foam::point vert(toPoint3D(vit->point()));
pointIndexHit pHit;
label hitSurface = -1;
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertFeaturePoints.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertFeaturePoints.C
index 1cf848eec..c746d95dc 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertFeaturePoints.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertFeaturePoints.C
@@ -109,8 +109,8 @@ void Foam::CV2D::insertFeaturePoints()
{
const edge& e = feMesh.edges()[edgeI];
- const point& ep0 = points[e.start()];
- const point& ep1 = points[e.end()];
+ const Foam::point& ep0 = points[e.start()];
+ const Foam::point& ep1 = points[e.end()];
const linePointRef line(ep0, ep1);
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearestPointPairs.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearestPointPairs.C
index d9232d274..d57e9d824 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearestPointPairs.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearestPointPairs.C
@@ -39,7 +39,7 @@ bool Foam::CV2D::dualCellSurfaceIntersection
{
if (!is_infinite(ec))
{
- point e0 = toPoint3D(circumcenter(ec->first));
+ Foam::point e0 = toPoint3D(circumcenter(ec->first));
// If edge end is outside bounding box then edge cuts boundary
if (!qSurf_.globalBounds().contains(e0))
@@ -47,7 +47,7 @@ bool Foam::CV2D::dualCellSurfaceIntersection
return true;
}
- point e1 = toPoint3D(circumcenter(ec->first->neighbor(ec->second)));
+ Foam::point e1 = toPoint3D(circumcenter(ec->first->neighbor(ec->second)));
// If other edge end is ouside bounding box then edge cuts boundary
if (!qSurf_.globalBounds().contains(e1))
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/miscellaneous/Allwmake b/applications/utilities/miscellaneous/Allwmake
new file mode 100755
index 000000000..56519236c
--- /dev/null
+++ b/applications/utilities/miscellaneous/Allwmake
@@ -0,0 +1,16 @@
+#!/bin/sh
+cd ${0%/*} || exit 1 # Run from this directory
+
+# Parse arguments for compilation (at least for error catching)
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
+
+wmake -all $targetType foamDictionary
+wmake -all $targetType foamFormatConvert
+wmake -all $targetType foamHelp
+wmake -all $targetType foamListTimes
+wmake -all $targetType patchSummary
+
+# Build addr2line utility only on macOS
+[ "$(uname -s)" = "Darwin" ] && wmake $targetType addr2line
+
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/miscellaneous/addr2line/Make/files b/applications/utilities/miscellaneous/addr2line/Make/files
new file mode 100644
index 000000000..a3dc48dff
--- /dev/null
+++ b/applications/utilities/miscellaneous/addr2line/Make/files
@@ -0,0 +1,3 @@
+addr2line.C
+
+EXE = $(FOAM_APPBIN)/addr2line
diff --git a/applications/utilities/miscellaneous/addr2line/Make/options b/applications/utilities/miscellaneous/addr2line/Make/options
new file mode 100644
index 000000000..4c3dd783c
--- /dev/null
+++ b/applications/utilities/miscellaneous/addr2line/Make/options
@@ -0,0 +1,3 @@
+EXE_INC =
+
+EXE_LIBS =
diff --git a/applications/utilities/miscellaneous/addr2line/addr2line.C b/applications/utilities/miscellaneous/addr2line/addr2line.C
new file mode 100644
index 000000000..51c673bb5
--- /dev/null
+++ b/applications/utilities/miscellaneous/addr2line/addr2line.C
@@ -0,0 +1,165 @@
+// Emulation of addr2line utility for macOS.
+
+#include <getopt.h>
+#include <cstdlib>
+
+#include "IOstreams.H"
+
+using Foam::string;
+using Foam::Info;
+using Foam::endl;
+using Foam::word;
+using Foam::label;
+using Foam::List;
+using Foam::nl;
+using Foam::regExp;
+
+static void usage();
+static void version();
+static string getLine(const string&, const word&);
+static string pOpen(const string&, label=0);
+
+int main(int argc, char *argv[])
+{
+ int functionsf = 0;
+ int versionf = 0;
+ int helpf = 0;
+ int ch;
+ string filename = "a.out";
+ List<word> addresses;
+
+ static struct option opts[] =
+ {
+ {"target", required_argument, NULL, 'b'},
+ {"demangle", required_argument, NULL, 'C'},
+ {"exe", required_argument, NULL, 'e'},
+ {"functions", no_argument, &functionsf, 1},
+ {"version", no_argument, &versionf, 1},
+ {"basename", no_argument, NULL, 's'},
+ {"inlines", no_argument, NULL, 'i'},
+ {"section", required_argument, NULL, 'j'},
+ {"help", no_argument, &helpf, 1},
+ {NULL, 0, NULL, 0}
+ };
+
+ while ((ch = getopt_long(argc, argv, "b:C:e:fVsij:H", opts, NULL)) != -1)
+ {
+ switch (ch)
+ {
+ case 'e':
+ filename = Foam::string(optarg);
+ break;
+ case 'C':
+ // Ignoring this flag for now
+ break;
+ case 'f':
+ // Functions are demangled in printStack
+ break;
+ case 0:
+ if (helpf) usage();
+ if (versionf) version();
+ break;
+ default:
+ usage();
+ }
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ if (argc <= 0)
+ {
+ usage();
+ }
+
+ while (argc > 0)
+ {
+ addresses.append(word(*argv));
+ argv++;
+ argc--;
+ }
+
+ forAll(addresses, i)
+ {
+ const word& addr = addresses[i];
+ string line = getLine(filename, addr);
+ Info << nl << line.c_str() << endl;
+ }
+
+ return 0;
+}
+
+void usage()
+{
+ Info << "usage: addr2line [-e filename|--exe=filename]"
+ " address [address...]" << endl;
+ exit(EXIT_FAILURE);
+}
+
+void version()
+{
+ Info << "OpenFOAM addr2line emulator v0.0.1" << endl;
+ exit(EXIT_SUCCESS);
+}
+
+string pOpen(const string& cmd, label line)
+{
+ string res = "\n";
+
+ FILE* cmdPipe = popen(cmd.c_str(), "r");
+
+ if (!cmdPipe) return "";
+
+ char* buf = nullptr;
+
+ // Read line number of lines
+ for (Foam::label cnt = 0; cnt <= line; cnt++)
+ {
+ size_t linecap = 0;
+ ssize_t linelen;
+ linelen = getline(&buf, &linecap, cmdPipe);
+
+ if (linelen < 0) break;
+
+ if (cnt == line)
+ {
+ res = Foam::string(buf);
+ break;
+ }
+ }
+
+ if (buf != nullptr) free(buf);
+
+ pclose(cmdPipe);
+
+ return res.substr(0, res.size() - 1);
+}
+
+string getLine(const string& filename, const word& address)
+{
+ string line = pOpen(
+ "echo 'image lookup -va "
+ + address
+ + "'"
+ + " | xcrun lldb "
+ + "-O 'target create --no-dependents -a x86_64 "
+ + filename
+ + "' -o '"
+ + "target module load -f "
+ + filename
+ + " __TEXT 0x0' 2> /dev/null"
+ + " | grep LineEntry");
+
+ List<string> groups;
+ regExp re(".+LineEntry: .+: (.+):([0-9]+):[0-9]+");
+ if (!re.match(line, groups))
+ {
+ line = "??:0";
+ }
+ else
+ {
+ line = groups[0] + ":" + groups[1];
+ }
+
+ return line;
+}
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 fe70a8f97..1402bb4a4 100755
--- a/bin/foamMonitor
+++ b/bin/foamMonitor
@@ -62,8 +62,15 @@ error() {
plotFileHeader() {
cat<<EOF
-set term x11 1 font "helvetica,17" linewidth 1.5 persist noraise
+selected_terminal = 'x11'
+if (strstrt(GPVAL_TERMINALS, 'wxt')) selected_terminal = 'wxt'
+if (strstrt(GPVAL_TERMINALS, 'qt')) selected_terminal = 'qt'
+
+set term selected_terminal 1 font "sans,16" linewidth 1.5 persist noraise enhanced
+set size ratio 0.62111801242236
+set grid
$logscale
+$explabels
$yrange
set title "$title"
set xlabel "$xlabel"
@@ -89,9 +96,12 @@ isInteger() {
idle=60
refresh=10
logscale=""
+explabels=""
yrange=""
title="Data Monitoring"
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 ]
@@ -107,6 +117,7 @@ do
;;
-l | -logscale)
logscale="set logscale y"
+ explabels='set format y "%.1g"'
shift 1
;;
-t | -title)
@@ -185,7 +196,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 2fcf6d77e..52e1a345e 100755
--- a/bin/paraFoam
+++ b/bin/paraFoam
@@ -75,6 +75,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 ed101f97d..b765e59d7 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
@@ -46,7 +49,7 @@ getNumberOfProcessors()
getApplication()
{
- sed -ne 's/^ *application\s*\([a-zA-Z]*\)\s*;.*$/\1/p' system/controlDict
+ foamDictionary -entry application -value system/controlDict
}
runApplication()
diff --git a/etc/bashrc b/etc/bashrc
index c89693b50..d524d93a1 100644
--- a/etc/bashrc
+++ b/etc/bashrc
@@ -52,6 +52,9 @@ export FOAM_INST_DIR=$HOME/$WM_PROJECT
# END OF (NORMAL) USER EDITABLE PART
################################################################################
+foamDarwin=0
+[ "$(uname -s)" = "Darwin" ] && foamDarwin=1
+
# 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 +65,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 +118,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
+[ $foamDarwin ] \
+ || export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
# Location of site-specific templates etc
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -135,8 +139,10 @@ export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. $WM_PROJECT_DIR/etc/config.sh/functions
+[ $foamDarwin ] && . $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 +154,26 @@ _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 [ $foamDarwin ]
+then
+ #- Clean DYLD_LIBRARY_PATH on macOS
+ cleaned=$($foamClean "$FOAM_DYLD_LIBRARY_PATH" "$foamOldDirs") \
+ && FOAM_DYLD_LIBRARY_PATH="$cleaned"
+ export FOAM_DYLD_LIBRARY_PATH
+ export DYLD_LIBRARY_PATH="$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 +185,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 [ $foamDarwin ]
+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 [ $foamDarwin ]
+ 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 +210,22 @@ fi
#- Clean PATH
cleaned=`$foamClean "$PATH"` && PATH="$cleaned"
-#- Clean LD_LIBRARY_PATH
-cleaned=`$foamClean "$LD_LIBRARY_PATH"` && LD_LIBRARY_PATH="$cleaned"
+if [ $foamDarwin ]
+then
+ #- Clean DYLD_LIBRARY_PATH
+ cleaned=`$foamClean "$FOAM_DYLD_LIBRARY_PATH"` && FOAM_DYLD_LIBRARY_PATH="$cleaned"
+ export FOAM_DYLD_LIBRARY_PATH
+ export DYLD_LIBRARY_PATH="$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 +244,9 @@ unset cleaned foamClean foamOldDirs
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. $WM_PROJECT_DIR/etc/config.sh/functions
+[ $foamDarwin ] && . $WM_PROJECT_DIR/etc/config.sh/mac/functions
+unset foamDarwin
+
# Source the bash completion file:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ "$BASH" ] && . $WM_PROJECT_DIR/etc/config.sh/bash_completion
diff --git a/etc/config.csh/mac/paraview b/etc/config.csh/mac/paraview
new file mode 100644
index 000000000..b5c25a41e
--- /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=tcsh et: ----------------------------
diff --git a/etc/config.csh/mpi b/etc/config.csh/mpi
index 4159e8717..f0c5d7353 100644
--- a/etc/config.csh/mpi
+++ b/etc/config.csh/mpi
@@ -274,4 +274,4 @@ else
setenv MPI_BUFFER_SIZE $minBufferSize
endif
-#------------------------------------------------------------------------------
+#----------------------------- vi: set ft=csh et: -----------------------------
diff --git a/etc/config.csh/paraview b/etc/config.csh/paraview
index 14e58414b..5f4d4d035 100644
--- a/etc/config.csh/paraview
+++ b/etc/config.csh/paraview
@@ -133,4 +133,4 @@ endif
unset cleaned cmake paraviewInstDir paraviewPython
-#------------------------------------------------------------------------------
+#----------------------------- vi: set ft=csh et: -----------------------------
diff --git a/etc/config.csh/settings b/etc/config.csh/settings
index c618f9f21..c6d77da8a 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 DYLD_LIBRARY_PATH \!*\:${DYLD_LIBRARY_PATH}; setenv FOAM_DYLD_LIBRARY_PATH \!*\:${FOAM_DYLD_LIBRARY_PATH}'
+else
+ alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'
+endif
# Prefix to MANPATH
alias _foamAddMan 'setenv MANPATH \!*\:${MANPATH}'
@@ -124,6 +128,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"
@@ -150,7 +161,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
@@ -197,7 +210,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}