TUT: skip some tutorials when dynamicCode is not available

- silence failed restoration of controlDict from controlDict.orig
  (idempotent?)
This commit is contained in:
Mark Olesen 2020-08-06 18:25:56 +02:00
parent 9ef144118d
commit 44052de594
24 changed files with 77 additions and 5 deletions

View File

@ -23,6 +23,10 @@ foamDictionary -help > /dev/null 2>&1 || {
}
# Some tests may need #calc
unset noDynamicCode
canCompile || noDynamicCode=true
for dict in \
good*.dict \
warn*.dict \
@ -31,6 +35,11 @@ for dict in \
do
[ -f "$dict" ] || continue # protect against bad globs
if [ "$noDynamicCode" = true ] && grep -q '#calc' "$dict"
then
continue
fi
# capture stderr, ignore stdout
stderr=$(foamDictionary -keywords $dict 2>&1 >/dev/null)
exitCode=$?

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
restore0Dir
runApplication blockMesh
runApplication $(getApplication) -withFunctionObjects -writePhi -writep

View File

@ -0,0 +1,11 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
runApplication blockMesh
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
runApplication kivaToFoam -file otape17
runApplication $(getApplication)

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
./Allrun.pre
# Serial

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
restore0Dir
runApplication blockMesh
runApplication -s preProcess $(getApplication) -postProcess -dict system/preProcess

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
echo "Use common files for 0/, constant/ and blockMeshDict"
rm -rf 0 constant
\cp -r ../common/0.orig 0

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
runApplication blockMesh
runApplication topoSet

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
echo "Linking processor*/ directory"
for proc in $(\ls -d ../steadyState/processor*)
do

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
./Allrun.pre
runApplication decomposePar

View File

@ -4,6 +4,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
runApplication blockMesh
# Turbulence closure models

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
runApplication blockMesh
runApplication topoSet
runApplication refineHexMesh c0 -overwrite

View File

@ -0,0 +1,11 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
runApplication blockMesh
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
restore0Dir
runApplication blockMesh

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
runApplication blockMesh
runApplication topoSet
runApplication subsetMesh -overwrite c0 -patch floatingObject

View File

@ -0,0 +1,11 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
runApplication blockMesh
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
# Create background mesh
runApplication blockMesh

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
./Allrun.pre
# Serial

View File

@ -8,7 +8,7 @@ cleanCase0
if notTest $@
then
mv -f system/controlDict.orig system/controlDict
mv -f system/controlDict.orig system/controlDict 2>/dev/null
fi
#------------------------------------------------------------------------------

View File

@ -8,7 +8,7 @@ cleanCase0
if notTest $@
then
mv -f system/controlDict.orig system/controlDict
mv -f system/controlDict.orig system/controlDict 2>/dev/null
fi
#------------------------------------------------------------------------------

View File

@ -8,7 +8,7 @@ cleanCase0
if notTest $@
then
mv -f system/controlDict.orig system/controlDict
mv -f system/controlDict.orig system/controlDict 2>/dev/null
fi
#------------------------------------------------------------------------------

View File

@ -8,7 +8,7 @@ cleanCase0
if notTest $@
then
mv -f system/controlDict.orig system/controlDict
mv -f system/controlDict.orig system/controlDict 2>/dev/null
fi
#------------------------------------------------------------------------------

View File

@ -8,7 +8,7 @@ cleanCase0
if notTest $@
then
mv -f system/controlDict.orig system/controlDict
mv -f system/controlDict.orig system/controlDict 2>/dev/null
fi
#------------------------------------------------------------------------------

View File

@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
restore0Dir
runApplication blockMesh