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 #------------------------------------------------------------------------------
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* \
70 constant/polyMesh/cell* \
71 constant/polyMesh/face* \
72 constant/polyMesh/meshModifiers* \
73 constant/polyMesh/owner* \
74 constant/polyMesh/neighbour* \
75 constant/polyMesh/point* \
76 constant/polyMesh/edge* \
77 constant/polyMesh/zoneToPatchName \
78 constant/polyMesh/cellLevel* \
79 constant/polyMesh/pointLevel* \
80 constant/polyMesh/refinementHistory*, \
81 constant/polyMesh/surfaceIndex* \
82 constant/cellToRegion \
83 constant/polyMesh/sets/ \
87 for f in `find . -name "*Dict"`
89 sed -e /arguments/d $f > temp.$$
96 echo "Removing $case case"
102 rm -rf {sets,samples,sampleSurfaces} > /dev/null 2>&1
107 rm -rf 0/{Ux,Uy,Uz} > /dev/null 2>&1
112 rm -rf ./constant/faMesh/{faceLabels*,faBoundary*} \
118 echo "Cleaning $PWD application"
123 #------------------------------------------------------------------------------