1 #---------------------------------*- sh -*-------------------------------------
3 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 # \\ / A nd | Copyright held by original author
7 #------------------------------------------------------------------------------
9 # This file is part of OpenFOAM.
11 # OpenFOAM 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 2 of the License, or (at your
14 # option) any later version.
16 # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 # You should have received a copy of the GNU General Public License
22 # along with OpenFOAM; if not, write to the Free Software Foundation,
23 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 #------------------------------------------------------------------------------
34 grep application system/controlDict | sed "s/application *\([a-zA-Z]*\);/\1/"
40 while getopts "l:" OPTFLAG ; do
42 shift $((OPTIND-1)) ; OPTIND=1
46 APP_NAME=${APP_RUN##*/}
48 if [ -z $LOG_NAME ] ; then
49 LOG_NAME=log.$APP_NAME
52 if [ -f $LOG_NAME ] ; then
53 echo "$APP_NAME already run on $PWD: remove log file to run"
55 echo "Running $APP_NAME on $PWD"
56 $APP_RUN $* > $LOG_NAME 2>&1
63 while getopts "l:" OPTFLAG ; do
65 shift $((OPTIND-1)) ; OPTIND=1
69 APP_NAME=${APP_RUN##*/}
71 if [ -z $LOG_NAME ] ; then
72 LOG_NAME=log.$APP_NAME
75 if [ -f $LOG_NAME ] ; then
76 echo "$APP_NAME already run on $PWD: remove log file to run"
78 echo "Running $APP_NAME in parallel on $PWD using $1 processes"
79 ( mpirun -np $1 $APP_RUN -parallel < /dev/null > $LOG_NAME 2>&1 )
85 echo "Compiling $1 application"
91 echo "Compiling $1 application"
98 echo "Case already cloned: remove case directory $2 to clone"
100 echo "Cloning $2 case from $1"
102 cpfiles="0 system constant"
114 ln -s ../../$2/system $2
116 ln -s ../../$2/constant $2
122 makeFsiResultsLinks ()
125 TIME_DIRS=`foamInfoExec -times | sed '1,/constant/d'`
126 echo "makeFsiResultsLinks for" $TIME_DIRS
130 ln -s ../$1/${T}/solid ${T}
135 #------------------------------------------------------------------------------