Files
openfoam/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre
2017-06-23 14:52:27 +01:00

46 lines
958 B
Bash
Executable File

#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Copy building from resources directory
mkdir -p constant/triSurface/
cp $FOAM_TUTORIALS/resources/geometry/building_wtc2.obj constant/triSurface/
# runApplication surfaceFeatureExtract
runApplication blockMesh
\rm -f constant/polyMesh/*Level
unset parallel
parallel=true
# Dummy 0 directory
mkdir 0
if [ "${parallel:-false}" = false ]
then
# Serial
runApplication snappyHexMesh -overwrite
\rm -f constant/polyMesh/refinementHistory*
restore0Dir
runApplication renumberMesh -overwrite
else
# Parallel
runApplication decomposePar -force
runParallel snappyHexMesh -overwrite
\ls -d processor* | xargs -I {} \rm -f ./{}/constant/polyMesh/refinementHistory
restore0Dir -processor
runParallel renumberMesh -overwrite
fi
#------------------------------------------------------------------------------