TUT: adjust tutorials for test loop

This commit is contained in:
Mark Olesen
2020-12-22 12:16:50 +01:00
parent e58b59ed6f
commit 7bdb509494
11 changed files with 49 additions and 22 deletions

View File

@ -1,6 +1,5 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
(cd steady && ./Allrun-parallel)

View File

@ -3,7 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
[[ -d constant/polyMesh ]] || runApplication ./Allrun.pre
# Generate mesh if required
[ -d constant/polyMesh ] || ./Allrun.pre
runApplication decomposePar
@ -11,4 +12,4 @@ runParallel $(getApplication)
runApplication reconstructPar -latestTime
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------

View File

@ -16,4 +16,4 @@ runApplication surfaceFeatureExtract
runApplication snappyHexMesh -overwrite
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------

View File

@ -3,14 +3,26 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
[[ -d constant/polyMesh ]] || rm -rf constant/polyMesh
parent="../steady"
latestTime=$(foamListTimes -case "$parent" -noZero -latestTime)
cp -rf ../steady/constant/polyMesh constant
if [ -z "$latestTime" ]
then
echo "FatalError: no latestTime found for $PWD/$parent"
exit 1
fi
# Replace mesh unconditionally
rm -rf constant/polyMesh
cp -rf "$parent"/constant/polyMesh constant
restore0Dir
cp -f ../steady/500/U 0/
cp -f ../steady/500/p 0/
# Restart from steady
cp -f \
"$parent/$latestTime"/U \
"$parent/$latestTime"/p \
0/
runApplication $(getApplication)

View File

@ -3,14 +3,26 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
[[ -d constant/polyMesh ]] || rm -rf constant/polyMesh
parent="../steady"
latestTime=$(foamListTimes -case "$parent" -noZero -latestTime)
cp -rf ../steady/constant/polyMesh constant
if [ -z "$latestTime" ]
then
echo "FatalError: no latestTime found for $PWD/$parent"
exit 1
fi
# Replace mesh unconditionally
rm -rf constant/polyMesh
cp -rf "$parent"/constant/polyMesh constant
restore0Dir
cp -f ../steady/500/U 0/
cp -f ../steady/500/p 0/
# Restart from steady
cp -f \
"$parent/$latestTime"/U \
"$parent/$latestTime"/p \
0/
runApplication decomposePar