STYLE: rationalize tutorial CleanFunctions (related to issue #279)

- include cleanup of other postProcessing directories:
  * Ensight, EnSight, ensightWrite

- don't need to remove files that cleanSnappyFiles already removed:
  * 0/cellLevel 0/pointLevel

- bundle removal of constant/ items together:
  * constant/cellDecomposition constant/polyMesh constant/tetDualMesh
This commit is contained in:
Mark Olesen
2016-10-28 13:23:13 +02:00
parent 9ab0406b47
commit be2a4319bd

View File

@ -97,29 +97,24 @@ cleanCase()
rm -rf surfaceSampling > /dev/null 2>&1 rm -rf surfaceSampling > /dev/null 2>&1
rm -rf cuttingPlane > /dev/null 2>&1 rm -rf cuttingPlane > /dev/null 2>&1
rm -rf system/machines > /dev/null 2>&1 rm -rf system/machines > /dev/null 2>&1
rm -rf Ensight EnSight ensightWrite VTK > /dev/null 2>&1
# From mpirunDebug # From mpirunDebug
rm -f gdbCommands mpirun.schema rm -f gdbCommands mpirun.schema
cleanSnappyFiles cleanSnappyFiles
if [ -d constant/polyMesh ] rm -f 0/cellDist > /dev/null 2>&1
then
rm -rf constant/polyMesh > /dev/null 2>&1
fi
if [ -d constant ] if [ -d constant ]
then then
(cd constant && \ (cd constant && \
rm -rf \ rm -rf \
cellToRegion cellLevel* pointLevel* \ cellDecomposition cellToRegion cellLevel* pointLevel* \
polyMesh tetDualMesh \
> /dev/null 2>&1 \ > /dev/null 2>&1 \
) )
fi fi
rm -rf constant/tetDualMesh > /dev/null 2>&1
rm -rf VTK > /dev/null 2>&1
rm -f 0/cellLevel 0/pointLevel 0/cellDist constant/cellDecomposition
if [ -e system/blockMeshDict.m4 ] if [ -e system/blockMeshDict.m4 ]
then then
rm -f system/blockMeshDict > /dev/null 2>&1 rm -f system/blockMeshDict > /dev/null 2>&1
@ -130,7 +125,7 @@ cleanCase()
removeCase() removeCase()
{ {
echo "Removing ${1:-unknown} case" echo "Removing ${1:-unknown} case"
rm -rf $1 [ "$#" -ge 1 ] && rm -rf "$1"
} }