-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathswak4Foam.patch
303 lines (270 loc) · 10.3 KB
/
swak4Foam.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
diff --git a/Allwclean b/Allwclean
index 74f7bb3..2e4a64f 100755
--- a/Allwclean
+++ b/Allwclean
@@ -13,7 +13,7 @@ fi
find . -name "*.dep" -print -exec rm {} \;
-find . -name compile_commands.json -print0 | xargs --null rm -f
-find . -name .clangd -print0 | xargs --null rm -rf
+find . -name compile_commands.json -print0 | xargs -0 rm -f
+find . -name .clangd -print0 | xargs -0 rm -rf
rm -f foamVersionThisIsCompiledFor
diff --git a/Allwmake b/Allwmake
index 40e8cd1..9b10b94 100755
--- a/Allwmake
+++ b/Allwmake
@@ -7,7 +7,7 @@ if [ -z "$WM_PROJECT_VERSION" ]; then
exit 42
fi
-PY_BINARY_PATH=$(which python)
+PY_BINARY_PATH=$(which python3)
if [[ $? != 0 ]]; then
echo "Some scripts require a binary 'python' to be installed"
echo "It doesn't matter if this is Python 2 or 3"
diff --git a/Libraries/rules/versionOptions b/Libraries/rules/versionOptions
index e8fe2fe..2abba0e 100644
--- a/Libraries/rules/versionOptions
+++ b/Libraries/rules/versionOptions
@@ -4,16 +4,16 @@
# Where am I
SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
-ECHO_CMD = /bin/echo
+# ECHO_CMD = /bin/echo
-num-sort = $(shell $(ECHO_CMD) -e $(subst :,'\n',$1) | sort --general-numeric-sort --key=1,1 -)
+# num-sort = $(shell $(ECHO_CMD) $(subst :,'\n',$1) | sort --general-numeric-sort --key=1,1 -)
# Generated file with information about the current foam version
include $(SELF_DIR)foamVersion
ifdef FOAM_DEV
FOAM_DEV_OPTION = -DFOAM_DEV
- ifeq "4.1" "$(word 1, $(call num-sort,4.1:$(WM_PROJECT_VERSION_NUM)))"
+ ifeq "4.1" "$(word 1, $(sort 4.1 $(WM_PROJECT_VERSION)))"
SWAK_IMMERSED_BC_LIB=-limmersedBoundary
endif
endif
@@ -51,7 +51,7 @@ ifdef OPENFOAM_COM
# triSurface merged into surfMesh
TRISURFACE_INC=
THERMOPHYSICALFUNCTIONS_LIB=
- else ifeq "1705" "$(word 1, $(call num-sort,1705:$(OPENFOAM_COM)))"
+ else ifeq "1705" "$(word 1, $(sort 1705 $(OPENFOAM_COM)))"
# Changes with 1706
WMAKE_NEW_CONVENTION=new
FOAM_UNIFIEDTURBULENCE=yes
@@ -59,7 +59,7 @@ ifdef OPENFOAM_COM
# triSurface merged into surfMesh
TRISURFACE_INC=
THERMOPHYSICALFUNCTIONS_LIB=
- else ifeq "1611" "$(word 1, $(call num-sort,1611:$(OPENFOAM_COM)))"
+ else ifeq "1611" "$(word 1, $(sort 1611 $(OPENFOAM_COM)))"
# Changes with 1612
WMAKE_NEW_CONVENTION=new
FOAM_UNIFIEDTURBULENCE=yes
@@ -70,16 +70,16 @@ endif
LAGRANGIAN_INTERMEDIATE_LIB=-llagrangianIntermediate
-ifdef OPENFOAM_ORG
- $(info OpenFOAM.org version $(OPENFOAM_ORG))
- ifeq "8" "$(word 1, $(call num-sort,8:$(OPENFOAM_ORG)))"
- FOAM_TURBULENCE_IS_NOW_MOMENTUM_TRANSPORT=yes
- endif
- ifeq "9" "$(word 1, $(call num-sort,9:$(OPENFOAM_ORG)))"
- FOAM_UNSUPPORTED_CLOUD_IMPLEMENTATION=yes
- LAGRANGIAN_INTERMEDIATE_LIB=
- endif
-endif
+# ifdef OPENFOAM_ORG
+# $(info OpenFOAM.org version $(OPENFOAM_ORG))
+# ifeq "8" "$(word 1, $(call num-sort,8:$(OPENFOAM_ORG)))"
+# FOAM_TURBULENCE_IS_NOW_MOMENTUM_TRANSPORT=yes
+# endif
+# ifeq "9" "$(word 1, $(call num-sort,9:$(OPENFOAM_ORG)))"
+# FOAM_UNSUPPORTED_CLOUD_IMPLEMENTATION=yes
+# LAGRANGIAN_INTERMEDIATE_LIB=
+# endif
+# endif
# -----------------------------------------------------------------------------
@@ -89,7 +89,7 @@ ifeq "dev" "$(WM_PROJECT_VERSION)"
FOAM_UNIFIEDTURBULENCE=yes
endif
-ifeq "3.0" "$(word 1, $(call num-sort,3.0:$(WM_PROJECT_VERSION_NUM)))"
+ifeq "3.0" "$(word 1, $(sort 3.0 $(WM_PROJECT_VERSION)))"
ifndef FOAM_DEV
WMAKE_NEW_CONVENTION=new
FOAM_UNIFIEDTURBULENCE=yes
@@ -101,15 +101,15 @@ ifeq "3.0" "$(word 1, $(call num-sort,3.0:$(WM_PROJECT_VERSION_NUM)))"
endif
INCOMPRESSIBLE_TRANSPORT_LIB=-lincompressibleTransportModels
-ifdef OPENFOAM_ORG
- ifeq "9" "$(word 1, $(call num-sort,9:$(OPENFOAM_ORG)))"
- ifeq "10" "$(word 1, $(call num-sort,10:$(OPENFOAM_ORG)))"
- INCOMPRESSIBLE_TRANSPORT_LIB=
- else
- INCOMPRESSIBLE_TRANSPORT_LIB=-ltransportModels
- endif
- endif
-endif
+# ifdef OPENFOAM_ORG
+# ifeq "9" "$(word 1, $(call num-sort,9:$(OPENFOAM_ORG)))"
+# ifeq "10" "$(word 1, $(call num-sort,10:$(OPENFOAM_ORG)))"
+# INCOMPRESSIBLE_TRANSPORT_LIB=
+# else
+# INCOMPRESSIBLE_TRANSPORT_LIB=-ltransportModels
+# endif
+# endif
+# endif
ifeq "$(FOAM_UNIFIEDTURBULENCE)" "yes"
COMPRESSIBLE_TRANSPORT_INC=-I$(LIB_SRC)/transportModels/compressible/lnInclude
@@ -122,22 +122,22 @@ ifeq "$(FOAM_UNIFIEDTURBULENCE)" "yes"
COMPRESSIBLE_TURB_ALL_LIBS=
RADIATION_INC=-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude
- ifdef OPENFOAM_ORG
- ifeq "9" "$(word 1, $(call num-sort,9:$(OPENFOAM_ORG)))"
- COMPRESSIBLE_TRANSPORT_INC=-I$(LIB_SRC)/transportModels/lnInclude
- endif
- endif
+ # ifdef OPENFOAM_ORG
+ # ifeq "9" "$(word 1, $(call num-sort,9:$(OPENFOAM_ORG)))"
+ # COMPRESSIBLE_TRANSPORT_INC=-I$(LIB_SRC)/transportModels/lnInclude
+ # endif
+ # endif
endif
ifeq "$(FOAM_TURBULENCE_IS_NOW_MOMENTUM_TRANSPORT)" "yes"
INCOMPRESSIBLE_TURB_LIB=-lmomentumTransportModels -lincompressibleMomentumTransportModels
COMPRESSIBLE_TURB_LIB=-lmomentumTransportModels -lfluidThermoMomentumTransportModels
COMPRESSIBLE_TRANSPORT_MODELS=-lthermophysicalTransportModels
- ifdef OPENFOAM_ORG
- ifeq "9" "$(word 1, $(call num-sort,9:$(OPENFOAM_ORG)))"
- COMPRESSIBLE_TURB_LIB=-lmomentumTransportModels -lcompressibleMomentumTransportModels
- endif
- endif
+ # ifdef OPENFOAM_ORG
+ # ifeq "9" "$(word 1, $(call num-sort,9:$(OPENFOAM_ORG)))"
+ # COMPRESSIBLE_TURB_LIB=-lmomentumTransportModels -lcompressibleMomentumTransportModels
+ # endif
+ # endif
endif
ifdef FOAM_DEV
@@ -147,38 +147,38 @@ ifdef FOAM_DEV
COMPRESSIBLE_TRANSPORT_MODELS=
FLUIDTHERMO_LIB=
else
- ifeq "2.2" "$(word 1, $(call num-sort,2.2:$(WM_PROJECT_VERSION_NUM)))"
+ ifeq "2.2" "$(word 1, $(sort 2.2 $(WM_PROJECT_VERSION)))"
FILEFORMATS_INC=-I$(LIB_SRC)/fileFormats/lnInclude
FLUIDTHERMO_LIB=-lfluidThermophysicalModels
SOLIDTHERMO_LIB=-lsolidThermo
FVOPTIONS_LIB=-lfvOptions
FVOPTIONS_INC=-I$(LIB_SRC)/fvOptions/lnInclude
- ifdef OPENFOAM_ORG
- ifeq "9" "$(word 1, $(call num-sort,9:$(OPENFOAM_ORG)))"
- FVOPTIONS_LIB=-lfvModels
- FVOPTIONS_INC=-I$(LIB_SRC)/fvModels/lnInclude
- endif
- endif
+ # ifdef OPENFOAM_ORG
+ # ifeq "9" "$(word 1, $(call num-sort,9:$(OPENFOAM_ORG)))"
+ # FVOPTIONS_LIB=-lfvModels
+ # FVOPTIONS_INC=-I$(LIB_SRC)/fvModels/lnInclude
+ # endif
+ # endif
endif
endif
DYNAMIC_FV_MESH_LIB=-ldynamicFvMesh -ltopoChangerFvMesh
-ifdef OPENFOAM_ORG
- ifeq "10" "$(word 1, $(call num-sort,10:$(WM_PROJECT_VERSION_NUM)))"
- DYNAMIC_FV_MESH_LIB=
- endif
-endif
+# ifdef OPENFOAM_ORG
+# ifeq "10" "$(word 1, $(call num-sort,10:$(WM_PROJECT_VERSION_NUM)))"
+# DYNAMIC_FV_MESH_LIB=
+# endif
+# endif
ifndef FOAM_DEV
ifndef OPENFOAM_COM
- ifeq "4" "$(word 1, $(call num-sort,4:$(WM_PROJECT_VERSION_NUM)))"
+ ifeq "4" "$(word 1, $(sort 4 $(WM_PROJECT_VERSION)))"
NEEDS_FILTER_DROPIN=1
endif
- ifeq "4" "$(word 1, $(call num-sort,4:$(WM_PROJECT_VERSION_NUM)))"
+ ifeq "4" "$(word 1, $(sort 4 $(WM_PROJECT_VERSION)))"
THERMOPHYSICALFUNCTIONS_LIB=
endif
- ifeq "7" "$(word 1, $(call num-sort,7:$(WM_PROJECT_VERSION_NUM)))"
+ ifeq "7" "$(word 1, $(sort 7 $(WM_PROJECT_VERSION)))"
RADIATION_INC=-I$(LIB_SRC)/radiationModels/lnInclude
endif
endif
diff --git a/Libraries/simpleFunctionObjects/functionObjectProxy/executeIfExecutableFitsFunctionObject/executeIfExecutableFitsFunctionObject.C b/Libraries/simpleFunctionObjects/functionObjectProxy/executeIfExecutableFitsFunctionObject/executeIfExecutableFitsFunctionObject.C
index d5a42e1..f460960 100644
--- a/Libraries/simpleFunctionObjects/functionObjectProxy/executeIfExecutableFitsFunctionObject/executeIfExecutableFitsFunctionObject.C
+++ b/Libraries/simpleFunctionObjects/functionObjectProxy/executeIfExecutableFitsFunctionObject/executeIfExecutableFitsFunctionObject.C
@@ -37,7 +37,7 @@ Contributors/Copyright:
#include "swakTime.H"
-#ifdef darwin
+#ifdef __APPLE__
#include "mach-o/dyld.h"
#endif
#ifdef __linux__
@@ -76,7 +76,7 @@ executeIfExecutableFitsFunctionObject::executeIfExecutableFitsFunctionObject
fileName exePath;
-#ifdef darwin
+#ifdef __APPLE__
{
char path[1024];
uint32_t size = sizeof(path);
diff --git a/Utilities/Allwmake b/Utilities/Allwmake
index b2c09ad..e12a223 100755
--- a/Utilities/Allwmake
+++ b/Utilities/Allwmake
@@ -19,7 +19,7 @@ wmake calcNonUniformOffsetsForMapped
wmake fieldReport
-wmake funkyPythonPostproc
+#wmake funkyPythonPostproc
if [[ "$OPENFOAM_ORG" != "" && $(( $OPENFOAM_ORG > 8 )) ]];
then
diff --git a/maintainanceScripts/makeCopyrightEntries.py b/maintainanceScripts/makeCopyrightEntries.py
index 0e31879..14abec0 100755
--- a/maintainanceScripts/makeCopyrightEntries.py
+++ b/maintainanceScripts/makeCopyrightEntries.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
import sys,re
from os import listdir,path
diff --git a/maintainanceScripts/makeFoamVersionHeader.py b/maintainanceScripts/makeFoamVersionHeader.py
index 5e5fa05..6df93ab 100755
--- a/maintainanceScripts/makeFoamVersionHeader.py
+++ b/maintainanceScripts/makeFoamVersionHeader.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# This is a bit warped because
# a. It has to support inconsistent version numbers
diff --git a/maintainanceScripts/makeSwakVersionFile.py b/maintainanceScripts/makeSwakVersionFile.py
index 12f507b..4b35708 100755
--- a/maintainanceScripts/makeSwakVersionFile.py
+++ b/maintainanceScripts/makeSwakVersionFile.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
import sys
from os import path
diff --git a/swakConfiguration b/swakConfiguration
new file mode 120000
index 0000000..cdfbd1d
--- /dev/null
+++ b/swakConfiguration
@@ -0,0 +1 @@
+./swakConfiguration.automatic
\ No newline at end of file
diff --git a/swakConfiguration.automatic b/swakConfiguration.automatic
index 6d9017d..e78cf29 100644
--- a/swakConfiguration.automatic
+++ b/swakConfiguration.automatic
@@ -89,7 +89,7 @@ export SWAK_COMPILE_GRAMMAR_OPTION="-O1"
if [ "$WM_USE_HOMEBREW" = 1 ]
then
- export SWAK_BISON=/usr/local/opt/bison27/bin/bison
+ export SWAK_BISON=$(brew --prefix bison)/bin/bison
fi
# If enabled, uses a 30 delay for building Bison generated files.