Added output of the patch area magnitude and the integral over the patch area magnitude.
[OpenFOAM-1.5.x.git] / bin / tools / CleanFunctions
blobcd6aae3f3ff016343d0e30a1b5606a5bc8766622
1 #---------------------------------*- sh -*-------------------------------------
2 # =========                 |
3 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4 #  \\    /   O peration     |
5 #   \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6 #    \\/     M anipulation  |
7 #------------------------------------------------------------------------------
8 # License
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
19 #     for more details.
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
25 # Script
26 #     CleanFunctions
28 # Description
30 #------------------------------------------------------------------------------
32 #cleanTimeDirectories ()
34 #    echo "Cleaning $case case of $application application"
35 #    TIME_DIRS=`foamInfoExec . $1 -times | sed '1,/constant/d'`
36 #    for T in $TIME_DIRS
37 #    do
38 #        if [ $T != "0" ] ; then
39 #            echo "Deleting directory $T"
40 #            rm -rf ${T} > /dev/null 2>&1
41 #        fi
42 #    done
43 #    rm -rf {log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.foam} > /dev/null 2>&1
46 cleanTimeDirectories ()
48     echo "Cleaning $PWD case"
49     nZeros=0
50     zeros=""
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))
57     done
58     rm -rf ./{[1-9]*,-[1-9]*,log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.foam} > /dev/null 2>&1
61 cleanCase ()
63     cleanTimeDirectories
65     rm -rf constant/polyMesh/{allOwner*,cell*,face*,meshModifiers*} \
66            constant/polyMesh/{owner*,neighbour*,point*,edge*} \
67            > /dev/null 2>&1
69     for f in `find . -name "*Dict"`
70     do
71         sed -e /arguments/d $f > temp.$$
72         mv temp.$$ $f
73     done
76 cleanParallelCase ()
78     cleanCase
80     rm -rf processor* > /dev/null 2>&1
83 removeCase ()
85     echo "Removing $case case"
86     rm -rf $1
89 cleanSamples ()
91     rm -rf {sets,samples,sampleSurfaces} > /dev/null 2>&1
94 cleanUcomponents ()
96     rm -rf 0/{Ux,Uy,Uz} > /dev/null 2>&1
99 cleanApplication ()
101     echo "Cleaning $PWD application"
102     wclean
106 #------------------------------------------------------------------------------