openfoam/tutorials/combustion/engineFoam/kivaTest/Allrun
Mark Olesen 6091cdb0a5 BUG: incorrect log-check in runParallel (RunFunctions)
STYLE: minor rewording, drop grep/sed in favour of sed only
2011-01-02 18:42:26 +01:00

43 lines
867 B
Bash
Executable File

#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application=`getApplication`
runKivaToFoam()
{
if [ -f log.kivaToFoam ]
then
echo "kivaToFoam already run: remove log file to re-run"
else
echo "kivaToFoam: converting kiva file"
kivaToFoam -file $1 > log.kivaToFoam 2>&1
fi
}
restartApplication()
{
if [ -f log-2.$1 ]
then
echo "$1 already run: remove log file to re-run"
else
echo "Running $1"
$1 > log-2.$1 2>&1
fi
}
runKivaToFoam otape17
cp system/controlDict.1st system/controlDict
runApplication $application
cp system/controlDict.2nd system/controlDict
restartApplication $application
# ----------------------------------------------------------------- end-of-file