mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TUT: adjust tutorials for test loop
This commit is contained in:
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -16,4 +16,4 @@ runApplication surfaceFeatureExtract
|
||||
|
||||
runApplication snappyHexMesh -overwrite
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user