STYLE: more consistent shell style in tutorial run/clean scripts

This commit is contained in:
Mark Olesen
2010-03-10 10:55:42 +01:00
parent 2068c67a33
commit 6b6dd51a27
112 changed files with 721 additions and 260 deletions

View 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
@ -7,3 +8,5 @@ cleanCase
rm -rf logs
rm -f *.eps yPlus_vs_uPlus
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -9,7 +10,8 @@ exponents="2 3 4 5 6 7 8"
echo "# yPlus vs uPlus" > yPlus_vs_uPlus
for e in $exponents; do
for e in $exponents
do
echo " Setting nu to 1e-$e"
sed "s/XXX/$e/g" constant/transportProperties.template \
@ -25,7 +27,8 @@ for e in $exponents; do
mv log.foamLog log.foamLog_$e
if [ -e logs/yPlus_0 ]; then
if [ -e logs/yPlus_0 ]
then
yPlus=`awk < logs/yPlus_0 'END{print $2}'`
uPlus=`awk < logs/uPlus_0 'END{print $2}'`
@ -39,7 +42,8 @@ done
# create validation plot
# 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
}
graphName="OF_vs_ANAYTICAL.eps"
@ -65,5 +69,6 @@ gnuplot<<EOF
"yPlus_vs_uPlus" title "OpenFOAM" with points lt 1 pt 6
EOF
echo Done
echo "done"
# ----------------------------------------------------------------- end-of-file