1 #---------------------------------*- sh -*-------------------------------------
3 # \\ / F ield | foam-extend: Open Source CFD
5 # \\ / A nd | For copyright notice see file Copyright
7 #------------------------------------------------------------------------------
9 # This file is part of foam-extend.
11 # foam-extend is free software: you can redistribute it and/or modify it
12 # under the terms of the GNU General Public License as published by the
13 # Free Software Foundation, either version 3 of the License, or (at your
14 # option) any later version.
16 # foam-extend is distributed in the hope that it will be useful, but
17 # WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 # General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
29 #------------------------------------------------------------------------------
33 grep application system/controlDict | sed "s/application *\([a-zA-Z]*\);/\1/"
39 while getopts "l:" OPTFLAG ; do
41 shift $((OPTIND-1)) ; OPTIND=1
45 APP_NAME=${APP_RUN##*/}
47 if [ -z $LOG_NAME ] ; then
48 LOG_NAME=log.$APP_NAME
51 if [ -f $LOG_NAME ] ; then
52 echo "$APP_NAME already run on $PWD: remove log file to run"
54 echo "Running $APP_NAME on $PWD"
55 $APP_RUN $* > $LOG_NAME 2>&1
62 while getopts "l:" OPTFLAG ; do
64 shift $((OPTIND-1)) ; OPTIND=1
68 APP_NAME=${APP_RUN##*/}
70 if [ -z $LOG_NAME ] ; then
71 LOG_NAME=log.$APP_NAME
74 if [ -f $LOG_NAME ] ; then
75 echo "$APP_NAME already run on $PWD: remove log file to run"
77 echo "Running $APP_NAME in parallel on $PWD using $1 processes"
78 if [ -z "$WM_MPIRUN_PROG" ]
82 # Allow exceentric systems to override the hardcoded mpirun
83 mpirunProg=$WM_MPIRUN_PROG
85 ( $mpirunProg -np $1 $APP_RUN -parallel < /dev/null > $LOG_NAME 2>&1 )
91 echo "Compiling $1 application"
97 echo "Compiling $1 application"
104 echo "Case already cloned: remove case directory $2 to clone"
106 echo "Cloning $2 case from $1"
108 cpfiles="0 system constant"
120 ln -s ../../$2/system $2
122 ln -s ../../$2/constant $2
128 makeFsiResultsLinks ()
131 TIME_DIRS=`foamInfoExec -times | sed '1,/constant/d'`
132 echo "makeFsiResultsLinks for" $TIME_DIRS
136 ln -s ../$1/${T}/solid ${T}
141 #------------------------------------------------------------------------------