mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
(
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
#!/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,22 +4,17 @@ 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
|
||||
[ ! -d 0 ] && cp -r 0.orig 0
|
||||
|
||||
runApplication decomposePar -copyZero
|
||||
runParallel snappyHexMesh -overwrite
|
||||
|
||||
#- For non-parallel running
|
||||
#cp -r 0.orig 0 > /dev/null 2>&1
|
||||
|
||||
#- For parallel running
|
||||
ls -d processor* | xargs -I {} rm -rf ./{}/0
|
||||
ls -d processor* | xargs -I {} cp -r 0.orig ./{}/0
|
||||
|
||||
runParallel patchSummary
|
||||
runParallel potentialFoam
|
||||
runParallel $(getApplication)
|
||||
|
||||
Reference in New Issue
Block a user