Skip to content
Snippets Groups Projects
Commit 1be5f699 authored by Henry Weller's avatar Henry Weller
Browse files

decomposePar: Added 'copyZero' option

Using

decomposePar -copyZero

The mesh is decomposed as usual but the '0' directory is recursively copied to
the 'processor.*' directories rather than decomposing the fields.  This is a
convenient option to handle cases where the initial field files are generic and
can be used for serial or parallel running.  See for example the
incompressible/simpleFoam/motorBike tutorial case.
parent 7a99465d
Branches
Tags
No related merge requests found
......@@ -135,8 +135,12 @@ void Foam::timeSelector::addOptions
argList::addBoolOption
(
"noZero",
"exclude the '0/' dir from the times list, "
"has precedence over the -withZero option"
string("exclude the '0/' dir from the times list")
+ (
withZero
? ", has precedence over the -withZero option"
: ""
)
);
argList::addBoolOption
(
......
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# remove surface and features
# Remove surface and features
rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1
......@@ -11,3 +12,5 @@ rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1
rm -rf 0 > /dev/null 2>&1
cleanCase
#------------------------------------------------------------------------------
......@@ -4,21 +4,16 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# copy motorbike surface from resources directory
# Copy motorbike surface from resources directory
cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
runApplication surfaceFeatureExtract
runApplication blockMesh
runApplication decomposePar
runParallel snappyHexMesh -overwrite
#- For non-parallel running
#cp -r 0.orig 0 > /dev/null 2>&1
[ ! -d 0 ] && cp -r 0.orig 0
#- For parallel running
ls -d processor* | xargs -I {} rm -rf ./{}/0
ls -d processor* | xargs -I {} cp -r 0.orig ./{}/0
runApplication decomposePar -copyZero
runParallel snappyHexMesh -overwrite
runParallel patchSummary
runParallel potentialFoam
......
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