1 #---------------------------------*- sh -*-------------------------------------
3 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 # \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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 #------------------------------------------------------------------------------
32 #cleanTimeDirectories ()
34 # echo "Cleaning $case case of $application application"
35 # TIME_DIRS=`foamInfoExec . $1 -times | sed '1,/constant/d'`
38 # if [ $T != "0" ] ; then
39 # echo "Deleting directory $T"
40 # rm -rf ${T} > /dev/null 2>&1
43 # rm -rf {log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.OpenFOAM} > /dev/null 2>&1
46 cleanTimeDirectories ()
48 echo "Cleaning $PWD case"
51 while [ $nZeros -lt 8 ] ; do
52 timeDir="0.${zeros}[1-9]*"
53 rm -rf ${timeDir} > /dev/null 2>&1
54 rm -rf ./-${timeDir} > /dev/null 2>&1
55 zeros=`printf %0${nZeros}d 0`
56 nZeros=$(($nZeros + 1))
58 rm -rf ./{[1-9]*,-[1-9]*,log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.OpenFOAM} > /dev/null 2>&1
64 rm -rf processor* > /dev/null 2>&1
65 rm -rf probes* > /dev/null 2>&1
66 rm -rf forces* > /dev/null 2>&1
68 rm -rf system/machines \
69 constant/polyMesh/{allOwner*,cell*,face*,meshModifiers*} \
70 constant/polyMesh/{owner*,neighbour*,point*,edge*} \
71 constant/polyMesh/{cellLevel*,pointLevel*,refinementHistory*,surfaceIndex*} \
72 constant/{cellToRegion,cellLevel*,pointLevel*} \
73 constant/polyMesh/sets/ \
77 for f in `find . -name "*Dict"`
79 sed -e /arguments/d $f > temp.$$
86 echo "Removing $case case"
92 rm -rf {sets,samples,sampleSurfaces} > /dev/null 2>&1
97 rm -rf 0/{Ux,Uy,Uz} > /dev/null 2>&1
102 echo "Cleaning $PWD application"
107 #------------------------------------------------------------------------------