TUT: add parallel version for various squareBend cases
- adjust commented-out evaluation to avoid warnings. With code like this ``` #if 0 nxin #eval{ round($nxin / 5) }; #endif ``` The handling of the "#if 0 / #endif" clause uses the plain ISstream parser to tokenize. This means that the "round(" is parsed as a word with a mismatched closing ')', whereas the "#eval" parser will slurp everything in until the closing brace and send it off as a string to the expression parser.
This commit is contained in:
parent
a3d90ae9b9
commit
096b9dc52e
@ -3,10 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase
|
||||
cleanCase0
|
||||
rm -f constant/polyMesh/boundary
|
||||
rm -f constant/polyMesh/zoneID
|
||||
|
||||
rm -rf 0
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase
|
||||
rm constant/polyMesh/boundary
|
||||
|
||||
rm -f constant/polyMesh/boundary
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication extrudeMesh
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase0
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -3,11 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
restore0Dir
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication topoSet
|
||||
./Allrun.pre
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
|
@ -1,8 +1,12 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase0
|
||||
./Allrun.pre
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -1,10 +1,12 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase0
|
||||
restore0Dir
|
||||
|
||||
rm -rf constant/triSurface
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication topoSet
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / O peration | Version: v2106 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -34,9 +34,9 @@ xin #eval{ $xin / 5 };
|
||||
xout #eval{ $xout / 5 };
|
||||
zmax #eval{ $zmax / 5 };
|
||||
|
||||
nxin #eval{ round($nxin / 5) };
|
||||
nxout #eval{ round($nxout / 5) };
|
||||
nz #eval{ round($nz / 5) };
|
||||
nxin #eval{ round ($nxin / 5) };
|
||||
nxout #eval{ round ($nxout / 5) };
|
||||
nz #eval{ round ($nz / 5) };
|
||||
#endif
|
||||
|
||||
zmin #eval{ -$zmax };
|
||||
|
@ -3,30 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
restore0Dir
|
||||
|
||||
cp -rf \
|
||||
"$FOAM_TUTORIALS"/resources/geometry/squareBend \
|
||||
constant/triSurface
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
# Extract some faces for sampling
|
||||
runApplication surfaceMeshExtract \
|
||||
-patches inlet -time 0 \
|
||||
constant/triSurface/inlet_sample0.obj
|
||||
|
||||
# Recentre and inflate
|
||||
runApplication surfaceTransformPoints \
|
||||
-recentre \
|
||||
-scale 3.5 \
|
||||
constant/triSurface/inlet_sample0.obj \
|
||||
constant/triSurface/inlet_sample1.obj
|
||||
|
||||
# Finer mesh
|
||||
runApplication surfaceRefineRedGreen \
|
||||
constant/triSurface/inlet_sample1.obj \
|
||||
constant/triSurface/oversized_sample.obj
|
||||
./Allrun.pre
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
|
12
tutorials/compressible/rhoSimpleFoam/squareBend/Allrun-parallel
Executable file
12
tutorials/compressible/rhoSimpleFoam/squareBend/Allrun-parallel
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
./Allrun.pre
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
32
tutorials/compressible/rhoSimpleFoam/squareBend/Allrun.pre
Executable file
32
tutorials/compressible/rhoSimpleFoam/squareBend/Allrun.pre
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
restore0Dir
|
||||
|
||||
cp -rf \
|
||||
"$FOAM_TUTORIALS"/resources/geometry/squareBend \
|
||||
constant/triSurface
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
# Extract some faces for sampling
|
||||
runApplication surfaceMeshExtract \
|
||||
-patches inlet -time 0 \
|
||||
constant/triSurface/inlet_sample0.obj
|
||||
|
||||
# Recentre and inflate
|
||||
runApplication surfaceTransformPoints \
|
||||
-recentre \
|
||||
-scale 3.5 \
|
||||
constant/triSurface/inlet_sample0.obj \
|
||||
constant/triSurface/inlet_sample1.obj
|
||||
|
||||
# Finer mesh
|
||||
runApplication surfaceRefineRedGreen \
|
||||
constant/triSurface/inlet_sample1.obj \
|
||||
constant/triSurface/oversized_sample.obj
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -3,11 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
restore0Dir
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication topoSet
|
||||
./Allrun.pre
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
|
12
tutorials/compressible/rhoSimpleFoam/squareBendLiq/Allrun-parallel
Executable file
12
tutorials/compressible/rhoSimpleFoam/squareBendLiq/Allrun-parallel
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
./Allrun.pre
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -1,10 +1,12 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase0
|
||||
restore0Dir
|
||||
|
||||
rm -rf constant/triSurface
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication topoSet
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / O peration | Version: v2106 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -34,9 +34,9 @@ xin #eval{ $xin / 5 };
|
||||
xout #eval{ $xout / 5 };
|
||||
zmax #eval{ $zmax / 5 };
|
||||
|
||||
nxin #eval{ round($nxin / 5) };
|
||||
nxout #eval{ round($nxout / 5) };
|
||||
nz #eval{ round($nz / 5) };
|
||||
nxin #eval{ round ($nxin / 5) };
|
||||
nxout #eval{ round ($nxout / 5) };
|
||||
nz #eval{ round ($nz / 5) };
|
||||
#endif
|
||||
|
||||
zmin #eval{ -$zmax };
|
||||
|
@ -3,11 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
restore0Dir
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication topoSet
|
||||
./Allrun.pre
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
|
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
./Allrun.pre
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -1,8 +1,12 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase0
|
||||
restore0Dir
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication topoSet
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / O peration | Version: v2106 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -34,9 +34,9 @@ xin #eval{ $xin / 5 };
|
||||
xout #eval{ $xout / 5 };
|
||||
zmax #eval{ $zmax / 5 };
|
||||
|
||||
nxin #eval{ round($nxin / 5) };
|
||||
nxout #eval{ round($nxout / 5) };
|
||||
nz #eval{ round($nz / 5) };
|
||||
nxin #eval{ round ($nxin / 5) };
|
||||
nxout #eval{ round ($nxout / 5) };
|
||||
nz #eval{ round ($nz / 5) };
|
||||
#endif
|
||||
|
||||
zmin #eval{ -$zmax };
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -3,17 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
mkdir -p constant/triSurface
|
||||
|
||||
cp -f \
|
||||
"$FOAM_TUTORIALS"/resources/geometry/angledPlane.obj.gz \
|
||||
constant/triSurface
|
||||
|
||||
restore0Dir
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication topoSet
|
||||
./Allrun.pre
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
|
12
tutorials/incompressible/simpleFoam/squareBend/Allrun-parallel
Executable file
12
tutorials/incompressible/simpleFoam/squareBend/Allrun-parallel
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
./Allrun.pre
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
18
tutorials/incompressible/simpleFoam/squareBend/Allrun.pre
Executable file
18
tutorials/incompressible/simpleFoam/squareBend/Allrun.pre
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
mkdir -p constant/triSurface
|
||||
|
||||
cp -f \
|
||||
"$FOAM_TUTORIALS"/resources/geometry/angledPlane.obj.gz \
|
||||
constant/triSurface
|
||||
|
||||
restore0Dir
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication topoSet
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / O peration | Version: v2106 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -34,9 +34,9 @@ xin #eval{ $xin / 5 };
|
||||
xout #eval{ $xout / 5 };
|
||||
zmax #eval{ $zmax / 5 };
|
||||
|
||||
nxin #eval{ round($nxin / 5) };
|
||||
nxout #eval{ round($nxout / 5) };
|
||||
nz #eval{ round($nz / 5) };
|
||||
nxin #eval{ round ($nxin / 5) };
|
||||
nxout #eval{ round ($nxout / 5) };
|
||||
nz #eval{ round ($nz / 5) };
|
||||
#endif
|
||||
|
||||
zmin #eval{ -$zmax };
|
||||
|
Loading…
Reference in New Issue
Block a user