Commit fe140cd6 authored by Mark Olesen's avatar Mark Olesen
Browse files

TUT: test mode not respected (closes #710)

- now replaced 'if ! isTest' with 'if notTest' for most cases.
parent 63edb602
......@@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
# \\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
......@@ -24,7 +24,7 @@
#------------------------------------------------------------------------------
#
# Look for '-parallel' in the argument list.
# Check presence of '-parallel' in the argument list.
#
isParallel()
{
......@@ -34,7 +34,7 @@ isParallel()
#
# Look for '-test' in the argument list.
# Check presence of '-test' in the argument list.
#
isTest()
{
......@@ -42,6 +42,15 @@ isTest()
return 1
}
#
# Check absence of '-test' in the argument list.
#
notTest()
{
for i; do [ "$i" = "-test" ] && return 1; done
return 0
}
#
# Extract 'numberOfSubdomains' from system/decomposeParDict
......
......@@ -20,7 +20,7 @@ setCombustionProperties()
# Do moriyoshiHomogeneous
( cd moriyoshiHomogeneous && foamRunTutorials )
if ! isTest $@
if notTest $@
then
# Clone case for second phase
cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2
......
......@@ -9,7 +9,7 @@ runApplication chemkinToFoam \
runApplication $(getApplication)
if ! isTest $@
if notTest $@
then
(cd validation && ./Allrun $*)
fi
......
......@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication $(getApplication)
if ! isTest $@
if notTest $@
then
(cd validation && ./Allrun $*)
fi
......
......@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication $(getApplication)
if ! isTest $@
if notTest $@
then
(cd validation && ./Allrun $*)
fi
......
......@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication $(getApplication)
if ! isTest $@
if notTest $@
then
(cd validation && ./Allrun $*)
fi
......
......@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication $(getApplication)
if ! isTest $@
if notTest $@
then
(cd validation && ./Allrun $*)
fi
......
......@@ -21,7 +21,7 @@ runParallel $(getApplication)
paraFoam -touch
paraFoam -touch -region panelRegion
if ! isTest $@
if notTest $@
then
(cd validation && ./createGraphs)
fi
......
......@@ -8,8 +8,8 @@ application=$(getApplication)
restore0Dir
runApplication chemkinToFoam \
chemkin/grimech30.dat chemkin/thermo30.dat chemkin/transportProperties \
constant/reactionsGRI constant/thermo.compressibleGasGRI
chemkin/grimech30.dat chemkin/thermo30.dat chemkin/transportProperties \
constant/reactionsGRI constant/thermo.compressibleGasGRI
runApplication blockMesh
runApplication setFields
......
......@@ -29,7 +29,7 @@ run resolved
# Run with the plenum modelled by a boundary condition
run modelled
if ! isTest $@
if notTest $@
then
# Plot a comparison of the pressure in the neck
cat << EOF | gnuplot -persist
......
......@@ -26,7 +26,7 @@ setDecompressionTankFine()
# Do decompressionTank
( cd decompressionTank && foamRunTutorials )
if ! isTest $@
if notTest $@
then
# Clone case
cloneCase decompressionTank decompressionTankFine
......
......@@ -6,7 +6,7 @@ runApplication blockMesh
runApplication $(getApplication)
runApplication -s sample postProcess -latestTime -func sample
if ! istest $@
if notTest $@
then
runApplication validation/createGraphs
fi
......
......@@ -32,7 +32,7 @@ do
rm -rf logs
done
if ! isTest $@
if notTest $@
then
# create validation plot
# Test if gnuplot exists on the system
......
......@@ -75,7 +75,7 @@ copyParallelPointDisplacement()
# Do steady-state case
(cd steady && foamRunTutorials)
if ! isTest $@
if notTest $@
then
latestTime=$(cd steady && foamListTimes -noZero -latestTime -processor)
......
......@@ -51,7 +51,7 @@ linkParallelCase()
# Do steady-state case
(cd steady && ./Allrun.pre)
if ! isTest $@
if notTest $@
then
# Copy/link the steady-state case to movement
linkParallelCase steady movement
......
......@@ -15,7 +15,7 @@ runParallel $(getApplication)
# Run noise tool for both point and surface
if ! isTest $@
if notTest $@
then
runParallel -s point noise -dict system/noiseDict-point
......
......@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Do the Spalart-Allmaras steady-state case
(cd motorBike && foamRunTutorials)
if ! isTest $@
if notTest $@
then
# Clone the steady-state case to the LES case
cloneParallelCase motorBike motorBikeLES
......
......@@ -9,7 +9,7 @@ cd ${0%/*} || exit 1 # Run from this directory
( cd blob && ./Allrun $* )
( cd simpleShapes && ./Allrun $* )
if ! isTest $@
if notTest $@
then
( cd flange && ./Allrun $* )
( cd mixerVessel && ./Allrun $* )
......
......@@ -25,7 +25,7 @@ setDamBreakFine ()
(cd damBreak && foamRunTutorials)
if ! isTest $@
if notTest $@
then
# Clone case
cloneCase damBreak damBreakFine
......
......@@ -24,7 +24,7 @@ setDamBreakFine ()
# Do damBreak
(cd damBreak && foamRunTutorials)
if ! isTest $@
if notTest $@
then
# Clone case
cloneCase damBreak damBreakFine
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment