ENH: patchCloud: return pTraits<Type>::max for unfound points
[OpenFOAM-1.7.x.git] / tutorials / Allrun
blob391389c5030b235eb4087400c1aad754c5f9fa94
1 #!/bin/sh
2 #---------------------------------*- sh -*-------------------------------------
3 # ========= |
4 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 # \\ / O peration |
6 # \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
7 # \\/ M anipulation |
8 #------------------------------------------------------------------------------
9 # License
10 # This file is part of OpenFOAM.
12 # OpenFOAM is free software: you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by
14 # the Free Software Foundation, either version 3 of the License, or
15 # (at your option) any later version.
17 # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
18 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 # for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 # Script
26 # Allrun
28 # Description
30 #------------------------------------------------------------------------------
32 cd ${0%/*} || exit 1 # run from this directory
34 # Source tutorial run functions
35 . $WM_PROJECT_DIR/bin/tools/RunFunctions
37 # logReport <logfile>
38 # Extracts useful info from log file.
39 logReport () {
40 case=`dirname $1 | sed s/"\(.*\)\.\/"/""/g`
41 app=`echo $1 | sed s/"\(.*\)\."/""/g`
42 appAndCase="Application $app - case $case"
44 fatalError=`grep "FOAM FATAL" $1`
45 UxSS=`grep -E "Ux[:| ]*solution singularity" $1`
46 UySS=`grep -E "Uy[:| ]*solution singularity" $1`
47 UzSS=`grep -E "Uz[:| ]*solution singularity" $1`
48 completed=`grep -E "^[\t ]*[eE]nd" $1`
50 if [ "$fatalError" ]
51 then
52 echo "$appAndCase: ** FOAM FATAL ERROR **"
53 return
54 elif [ "$UxSS" -a "$UySS" -a "$UzSS" ]
55 then
56 echo "$appAndCase: ** Solution singularity **"
57 return
58 elif [ "$completed" ]
59 then
60 completionTime=`tail -10 $log | grep Execution | cut -d= -f2 | sed 's/^[ \t]*//'`
61 if [ "$completionTime" ]
62 then
63 completionTime="in $completionTime"
65 echo "$appAndCase: completed $completionTime"
66 return
67 else
68 echo "$appAndCase: unconfirmed completion"
73 # Recursively run all tutorials
74 foamRunTutorials cases
77 # Analyse all log files
78 rm testLoopReport > /dev/null 2>&1 &
79 touch testLoopReport
80 for application in *
82 if [ -d $application ]
83 then
84 cd $application
85 for log in `find . -name "log.*" | xargs ls -rt`
87 logReport $log >> ../testLoopReport
88 done
89 echo "" >> ../testLoopReport
90 cd ..
92 done
94 find . -name "log.*" -exec cat {} \; >> logs
96 # ----------------------------------------------------------------- end-of-file