OpenFOAM field reading: Automated the handling of <field>.orig files
Now if a <field> file does not exist first the compressed <field>.gz file is searched for and if that also does not exist the <field>.orig file is searched for. This simplifies case setup and run scripts as now setField for example can read the <field>.orig file directly and generate the <field> file from it which is then read by the solver. Additionally the cleanCase function used by foamCleanCase and the Allclean scripts automatically removed <field> files if there is a corresponding <field>.orig file. So now there is no need for the Allrun scripts to copy <field>.orig files into <field> or for the Allclean scripts to explicitly remove them.
This commit is contained in:
@ -59,13 +59,6 @@ cleanCase()
|
||||
rm -rf jobInfo > /dev/null 2>&1
|
||||
rm -rf postProcessing > /dev/null 2>&1
|
||||
rm -rf TDAC > /dev/null 2>&1
|
||||
rm -rf probes* > /dev/null 2>&1
|
||||
rm -rf forces* > /dev/null 2>&1
|
||||
rm -rf graphs* > /dev/null 2>&1
|
||||
rm -rf sets > /dev/null 2>&1
|
||||
rm -rf surfaceSampling > /dev/null 2>&1
|
||||
rm -rf cuttingPlane > /dev/null 2>&1
|
||||
rm -rf system/machines > /dev/null 2>&1
|
||||
|
||||
if [ -d constant/polyMesh ]
|
||||
then
|
||||
@ -83,12 +76,16 @@ cleanCase()
|
||||
rm -rf constant/tetDualMesh > /dev/null 2>&1
|
||||
|
||||
rm -rf VTK > /dev/null 2>&1
|
||||
rm -rf sequencedVTK > /dev/null 2>&1
|
||||
|
||||
rm -f 0/cellLevel 0/pointLevel 0/cellDist constant/cellDecomposition
|
||||
|
||||
if [ -e system/blockMeshDict.m4 ]
|
||||
then
|
||||
rm -f system/blockMeshDict > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
find . -name "*.orig" -type f -exec sh -c 'rm -f ${0%.*} ${0%.*}.gz' {} \;
|
||||
}
|
||||
|
||||
removeCase()
|
||||
|
||||
Reference in New Issue
Block a user