tutorial scripts

This commit is contained in:
mattijs
2008-06-12 19:32:10 +01:00
parent adcce409ab
commit 91c2d7743b
60 changed files with 1374 additions and 298 deletions

View File

@ -38,33 +38,33 @@
# do
# if [ $T != "0" ] ; then
# echo "Deleting directory $T"
# rm -rf $1/${T} > /dev/null 2>&1
# rm -rf ${T} > /dev/null 2>&1
# fi
# done
# rm -rf $1/{log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.foam} > /dev/null 2>&1
# rm -rf {log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.foam} > /dev/null 2>&1
#}
cleanTimeDirectories ()
{
echo "Cleaning $case case of $application application"
echo "Cleaning $PWD case"
nZeros=0
zeros=""
while [ $nZeros -lt 8 ] ; do
timeDir="0.${zeros}[1-9]*"
rm -rf $1/${timeDir} > /dev/null 2>&1
rm -rf $1/-${timeDir} > /dev/null 2>&1
rm -rf ${timeDir} > /dev/null 2>&1
rm -rf ./-${timeDir} > /dev/null 2>&1
zeros=`printf %0${nZeros}d 0`
nZeros=$(($nZeros + 1))
done
rm -rf $1/{[1-9]*,-[1-9]*,log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.foam} > /dev/null 2>&1
rm -rf ./{[1-9]*,-[1-9]*,log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.foam} > /dev/null 2>&1
}
cleanCase ()
{
cleanTimeDirectories $1
cleanTimeDirectories
rm -rf $1/constant/polyMesh/{allOwner*,cell*,face*,meshModifiers*} \
$1/constant/polyMesh/{owner*,neighbour*,point*,edge*} \
rm -rf constant/polyMesh/{allOwner*,cell*,face*,meshModifiers*} \
constant/polyMesh/{owner*,neighbour*,point*,edge*} \
> /dev/null 2>&1
for f in `find . -name "*Dict"`
@ -76,25 +76,25 @@ cleanCase ()
cleanParallelCase ()
{
cleanCase $1
cleanCase
rm -rf $1/processor* > /dev/null 2>&1
rm -rf processor* > /dev/null 2>&1
}
removeCase ()
{
echo "Removing $case case of $application application"
echo "Removing $case case"
rm -rf $1
}
cleanSamples ()
{
rm -rf $1/{samples,sampleSurfaces} > /dev/null 2>&1
rm -rf {samples,sampleSurfaces} > /dev/null 2>&1
}
cleanUcomponents ()
{
rm -rf $1/0/{Ux,Uy,Uz} > /dev/null 2>&1
rm -rf 0/{Ux,Uy,Uz} > /dev/null 2>&1
}
#------------------------------------------------------------------------------