mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: more consistent shell style in tutorial run/clean scripts
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
cp 0/T.org 0/T
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -8,3 +10,5 @@ compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom
|
||||
runApplication blockMesh
|
||||
runApplication setHotRoom
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
cp 0/T.org 0/T
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -8,3 +10,5 @@ compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom
|
||||
runApplication blockMesh
|
||||
runApplication setHotRoom
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -6,3 +8,4 @@ runApplication blockMesh
|
||||
runApplication snappyHexMesh -overwrite
|
||||
runApplication buoyantBoussinesqSimpleFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -6,3 +7,5 @@
|
||||
cleanCase
|
||||
cp 0/T.org 0/T
|
||||
wclean setHotRoom
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -9,3 +11,5 @@ compileApplication setHotRoom
|
||||
runApplication blockMesh
|
||||
runApplication setHotRoom
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -rf sets
|
||||
(cd validation && rm -f *.eps)
|
||||
rm -f validation/*.eps
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -8,4 +10,7 @@ application="buoyantSimpleFoam"
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
runApplication sample -latestTime
|
||||
(cd validation && ./createGraphs)
|
||||
|
||||
( cd validation && ./createGraphs )
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -32,7 +32,8 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
createEpsT() {
|
||||
createEpsT()
|
||||
{
|
||||
index=$1
|
||||
OF=$2
|
||||
EXPT=$3
|
||||
@ -54,7 +55,8 @@ EOF
|
||||
}
|
||||
|
||||
|
||||
createEpsU() {
|
||||
createEpsU()
|
||||
{
|
||||
index=$1
|
||||
OF=$2
|
||||
EXPT=$3
|
||||
@ -78,7 +80,8 @@ EOF
|
||||
|
||||
# test if gnuplot exists on the system
|
||||
type -P gnuplot &>/dev/null || {
|
||||
echo "gnuplot not found - skipping graph creation" >&2; exit 1;
|
||||
echo "gnuplot not found - skipping graph creation" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# paths to data
|
||||
@ -89,7 +92,8 @@ EXPTDATAROOT=./exptData
|
||||
|
||||
# generate temperature profiles
|
||||
TSets="1 3 4 5 6 7 9"
|
||||
for i in $TSets; do
|
||||
for i in $TSets
|
||||
do
|
||||
echo " processing temperature profile at y/yMax of 0.$i"
|
||||
|
||||
OF="$OFDATAROOT/y0.${i}_T.xy"
|
||||
@ -101,7 +105,8 @@ done
|
||||
|
||||
# generate velocity profiles
|
||||
USets="1 3 4 5 6 7 9"
|
||||
for i in $USets; do
|
||||
for i in $USets
|
||||
do
|
||||
echo " processing velocity profile at y/yMax of 0.$i"
|
||||
|
||||
OF="$OFDATAROOT/y0.${i}_U.xy"
|
||||
@ -110,6 +115,6 @@ for i in $USets; do
|
||||
createEpsU $i $OF $EXPT
|
||||
done
|
||||
|
||||
echo "done"
|
||||
echo Done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
cp 0/T.org 0/T
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -8,3 +10,5 @@ compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom
|
||||
runApplication blockMesh
|
||||
runApplication setHotRoom
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -18,4 +19,4 @@ rm -rf constant/heater/polyMesh
|
||||
rm -rf constant/leftSolid/polyMesh
|
||||
rm -rf constant/rightSolid/polyMesh
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -58,4 +60,4 @@ do
|
||||
paraFoam -touch -region $i
|
||||
done
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -18,4 +19,4 @@ rm -rf constant/heater/polyMesh
|
||||
rm -rf constant/leftSolid/polyMesh
|
||||
rm -rf constant/rightSolid/polyMesh
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -55,4 +57,4 @@ do
|
||||
paraFoam -touch -region $i
|
||||
done
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
Reference in New Issue
Block a user