mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
35 lines
930 B
Bash
Executable File
35 lines
930 B
Bash
Executable File
#!/bin/sh
|
|
cd ${0%/*} || exit 1 # run from this directory
|
|
|
|
# Source tutorial run functions
|
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
|
|
|
# Get the number of processors to run on from system/decomposeParDict
|
|
nProc=`grep numberOfSubdomains system/decomposeParDict \
|
|
| sed s/"numberOfSubdomains *\(.*\);"/"\1"/`
|
|
|
|
runApplication blockMesh
|
|
runApplication decomposePar
|
|
|
|
for dir in processor*
|
|
do
|
|
if [[ -d $dir ]]
|
|
then
|
|
cp -r $dir/constant/polyMesh $dir/constant/polyMesh_background
|
|
fi
|
|
done
|
|
|
|
runParallel cvMesh $nProc
|
|
|
|
runApplication reconstructParMesh -constant -mergeTol 1e-10
|
|
runParallel checkMesh $nProc -constant -allGeometry -allTopology
|
|
|
|
# To run from the same background mesh as before
|
|
# for dir in processor*;
|
|
# do
|
|
# rm -r $dir/constant/polyMesh
|
|
# cp -r $dir/constant/polyMesh_background $dir/constant/polyMesh
|
|
# done
|
|
|
|
# ----------------------------------------------------------------- end-of-file
|