Commit 096b9dc5 authored by Mark Olesen's avatar Mark Olesen
Browse files

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.
parent a3d90ae9
......@@ -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
#------------------------------------------------------------------------------
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase
......
#!/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
#------------------------------------------------------------------------------
#!/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
......
#!/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)
......
#!/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)
#------------------------------------------------------------------------------
#!/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
#------------------------------------------------------------------------------
/*--------------------------------*- 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)
......
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
./Allrun.pre
runApplication decomposePar
runParallel $(getApplication)
#------------------------------------------------------------------------------
#!/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)
......
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
./Allrun.pre
runApplication decomposePar
runParallel $(getApplication)
#------------------------------------------------------------------------------
#!/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
#------------------------------------------------------------------------------
/*--------------------------------*- 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)
......
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
./Allrun.pre
runApplication decomposePar
runParallel $(getApplication)
#------------------------------------------------------------------------------
#!/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
#------------------------------------------------------------------------------
/*--------------------------------*- 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 };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment