mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +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
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"noZero",
|
"noZero",
|
||||||
"exclude the '0/' dir from the times list, "
|
string("exclude the '0/' dir from the times list")
|
||||||
"has precedence over the -withZero option"
|
+ (
|
||||||
|
withZero
|
||||||
|
? ", has precedence over the -withZero option"
|
||||||
|
: ""
|
||||||
|
)
|
||||||
);
|
);
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
# Source tutorial clean functions
|
# Source tutorial clean functions
|
||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. $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 -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
|
||||||
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
|
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
|
||||||
rm -f constant/triSurface/motorBike.eMesh > /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
|
rm -rf 0 > /dev/null 2>&1
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -4,22 +4,17 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
# Source tutorial run functions
|
# Source tutorial run functions
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
. $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/
|
cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
|
||||||
runApplication surfaceFeatureExtract
|
runApplication surfaceFeatureExtract
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
|
|
||||||
runApplication decomposePar
|
[ ! -d 0 ] && cp -r 0.orig 0
|
||||||
|
|
||||||
|
runApplication decomposePar -copyZero
|
||||||
runParallel snappyHexMesh -overwrite
|
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 patchSummary
|
||||||
runParallel potentialFoam
|
runParallel potentialFoam
|
||||||
runParallel $(getApplication)
|
runParallel $(getApplication)
|
||||||
|
|||||||
Reference in New Issue
Block a user