mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
FIX: provide restore0Dir function to fix issue #159
- makes it easier to ensure the correct behaviour, consistently
This commit is contained in:
@ -5,10 +5,9 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# copy DTC hull surface from resources folder
|
||||
cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
|
||||
\cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
|
||||
|
||||
runApplication surfaceFeatureExtract
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
for i in 1 2 3 4 5 6
|
||||
@ -21,18 +20,11 @@ do
|
||||
done
|
||||
|
||||
runApplication snappyHexMesh -overwrite
|
||||
|
||||
\rm -rf 0
|
||||
\cp -r 0.org 0
|
||||
|
||||
restore0Dir
|
||||
runApplication setFields
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
runParallel renumberMesh -overwrite
|
||||
|
||||
runParallel $(getApplication)
|
||||
|
||||
runApplication reconstructPar
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
cp -r 0.org 0 > /dev/null 2>&1
|
||||
restore0Dir
|
||||
runApplication blockMesh
|
||||
#runApplication setSet -batch createObstacle.setSet
|
||||
runApplication topoSet
|
||||
|
||||
@ -10,7 +10,7 @@ application=`getApplication`
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
runApplication subsetMesh -overwrite c0 -patch floatingObject
|
||||
cp -r 0.org 0 > /dev/null 2>&1
|
||||
restore0Dir
|
||||
runApplication setFields
|
||||
runApplication $application
|
||||
|
||||
|
||||
@ -16,8 +16,8 @@ runApplication snappyHexMesh -overwrite
|
||||
runApplication createBaffles -overwrite
|
||||
runApplication mergeOrSplitBaffles -split -overwrite
|
||||
|
||||
# Copy fields after meshing to avoind the generation of unnecessary patch fields
|
||||
\cp -r 0.org 0
|
||||
# Copy fields after meshing to avoid the generation of unnecessary patch fields
|
||||
restore0Dir
|
||||
|
||||
# Initialize alpha
|
||||
runApplication setFields
|
||||
|
||||
@ -5,23 +5,27 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# 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 blockMesh
|
||||
|
||||
# Serial
|
||||
# ------
|
||||
#runApplication snappyHexMesh -overwrite
|
||||
#\rm -f constant/polyMesh/refinementHistory*
|
||||
# - set the initial fields
|
||||
#cp -rf 0.org 0
|
||||
# restore0Dir
|
||||
#runApplication setFields
|
||||
|
||||
# Parallel
|
||||
# --------
|
||||
runApplication decomposePar -force
|
||||
runParallel snappyHexMesh -overwrite
|
||||
ls -d processor* | xargs -I {} rm -f ./{}/constant/polyMesh/refinementHistory
|
||||
\ls -d processor* | xargs -I {} rm -f ./{}/constant/polyMesh/refinementHistory
|
||||
|
||||
# - set the initial fields
|
||||
ls -d processor* | xargs -I {} rm -rf ./{}/0
|
||||
ls -d processor* | xargs -I {} cp -r 0.org ./{}/0
|
||||
\ls -d processor* | xargs -I {} \rm -rf ./{}/0
|
||||
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0
|
||||
runParallel setFields
|
||||
|
||||
Reference in New Issue
Block a user