FIX: provide restore0Dir function to fix issue #159

- makes it easier to ensure the correct behaviour, consistently
This commit is contained in:
Mark Olesen
2016-06-27 16:33:55 +02:00
parent dd3fb6225f
commit dd60cfcd06
76 changed files with 205 additions and 190 deletions

View File

@ -4,11 +4,17 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd hopperInitialState
cleanCase
(
cd hopperInitialState || exit 1
cd ../hopperEmptying
cleanCase
rm -rf 0
cleanCase
)
(
cd hopperEmptying || exit 1
cleanCase
rm -rf 0
)
#------------------------------------------------------------------------------

View File

@ -4,20 +4,24 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cd hopperInitialState
runApplication blockMesh
runApplication decomposePar
runParallel `getApplication`
runApplication reconstructPar -latestTime
cd ..
(
cd hopperInitialState || exit 1
cd hopperEmptying
rm -rf 0
cp -r 0.org 0
runApplication blockMesh
runApplication mapFields ../hopperInitialState -sourceTime latestTime
runApplication decomposePar
runParallel `getApplication`
runApplication reconstructPar
runApplication blockMesh
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar -latestTime
)
(
cd hopperEmptying || exit 1
restore0Dir
runApplication blockMesh
runApplication mapFields ../hopperInitialState -sourceTime latestTime
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar
)
#------------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cp -rf 0.org 0
restore0Dir
runApplication blockMesh
#runApplication setSet -batch wallFilmRegion.setSet

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cp -rf 0.org 0
restore0Dir
# create the underlying block mesh
runApplication blockMesh

View File

@ -1,7 +1,7 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cp -rf 0.org 0
restore0Dir
runApplication blockMesh

View File

@ -1,7 +1,7 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cp -rf 0.org 0
restore0Dir
runApplication blockMesh

View File

@ -6,13 +6,10 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
# remove 0 directory
rm -rf 0
# remove 0 directory and post-processing directories
\rm -rf 0 postProcessing
# remove post-processing directory
rm -rf postProcessing
# copy 0.org to 0
cp -r 0.org 0
# restore 0/ directory from 0.org/
\cp -r 0.org 0
#------------------------------------------------------------------------------

View File

@ -7,12 +7,12 @@ cd ${0%/*} || exit 1 # Run from this directory
# create mesh
runApplication blockMesh
cp -r 0.org 0
restore0Dir
# initialise with potentialFoam solution
runApplication potentialFoam
rm -f 0/phi
\rm -f 0/phi
# run the solver
runApplication `getApplication`

View File

@ -7,12 +7,12 @@ cd ${0%/*} || exit 1 # Run from this directory
# create mesh
runApplication blockMesh
cp -r 0.org 0
restore0Dir
# initialise with potentialFoam solution
runApplication potentialFoam
rm -f 0/phi
\rm -f 0/phi
# run the solver
runApplication `getApplication`

View File

@ -5,10 +5,10 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# remove old time and post-processing directories
rm -rf 0 *[1-9]* processor* postProcessing
\rm -rf 0 *[1-9]* processor* postProcessing
# copy 0.org to 0
cp -r 0.org 0
# restore 0/ directory from 0.org/
\cp -r 0.org 0
cleanCase

View File

@ -4,15 +4,14 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
rm -rf 0
cp -rf 0.org 0
restore0Dir
runApplication blockMesh
runApplication potentialFoam
# remove incompatible (volumetric) flux field
rm -f 0/phi
\rm -f 0/phi 2>/dev/null
runApplication $(getApplication)