From 5f64d07ca8dad6c85c5402767cc4b2483d360282 Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Mon, 21 Jun 2021 16:44:38 +0100 Subject: [PATCH] tutorials: remove redirects to /dev/null --- bin/tools/CleanFunctions | 53 ++++++++----------- tutorials/Allclean | 2 +- tutorials/basic/laplacianFoam/flange/Allclean | 3 +- .../basic/potentialFoam/cylinder/Allclean | 4 +- .../basic/potentialFoam/pitzDaily/Allclean | 4 +- .../combustion/XiEngineFoam/kivaTest/Allclean | 5 +- .../rhoCentralFoam/biconic25-55Run35/Allclean | 2 +- .../RAS/aerofoilNACA0012/Allclean | 4 +- .../RAS/annularThermalMixer/Allclean | 3 +- .../rhoPimpleFoam/RAS/nacaAirfoil/Allclean | 1 - .../rhoSimpleFoam/aerofoilNACA0012/Allclean | 6 +-- .../dsmcFoam/freeSpacePeriodic/Allclean | 2 +- .../dsmcFoam/freeSpaceStream/Allclean | 2 +- .../dsmcFoam/supersonicCorner/Allclean | 2 +- .../dsmcFoam/wedge15Ma5/Allclean | 2 +- .../circuitBoardCooling/Allclean | 1 - .../externalCoupledCavity/Allclean | 3 +- .../chtMultiRegionFoam/coolingSphere/Allclean | 4 +- .../incompressible/icoFoam/elbow/Allclean | 1 - .../pimpleFoam/RAS/propeller/Allclean | 6 +-- .../pimpleFoam/laminar/planarCouette/Allclean | 4 -- .../straightDuctImplicit/Allclean | 6 +-- .../simpleFoam/airFoil2D/Allclean | 2 +- .../simpleFoam/motorBike/Allclean | 5 +- .../simpleFoam/rotorDisk/Allclean | 10 ++-- .../simpleFoam/windAroundBuildings/Allclean | 5 +- tutorials/mesh/foamyHexMesh/blob/Allclean | 21 ++++---- tutorials/mesh/foamyHexMesh/flange/Allclean | 21 ++++---- .../mesh/foamyHexMesh/simpleShapes/Allclean | 17 +++--- .../foamyQuadMesh/jaggedBoundary/Allclean | 8 ++- tutorials/mesh/foamyQuadMesh/square/Allclean | 8 ++- .../mesh/refineMesh/refineFieldDirs/Allclean | 2 +- tutorials/mesh/snappyHexMesh/flange/Allclean | 8 ++- tutorials/mesh/snappyHexMesh/pipe/Allclean | 3 +- .../cavitatingFoam/LES/throttle/Allclean | 6 +-- .../cavitatingFoam/LES/throttle3D/Allclean | 2 +- .../cavitatingFoam/RAS/throttle/Allclean | 6 +-- .../driftFluxFoam/RAS/tank3D/Allclean | 2 +- .../interFoam/LES/nozzleFlow2D/Allclean | 2 +- .../multiphase/interFoam/RAS/DTCHull/Allclean | 5 +- .../interFoam/RAS/DTCHullMoving/Allclean | 5 +- .../interFoam/RAS/DTCHullWave/Allclean | 5 +- .../interFoam/RAS/mixerVesselAMI/Allclean | 6 +-- .../interFoam/RAS/planingHullW3/Allclean | 6 +-- .../interFoam/RAS/propeller/Allclean | 6 +-- .../interFoam/RAS/waterChannel/Allclean | 2 +- .../laminar/containerDischarge2D/Allclean | 2 +- .../laminar/damBreakWithObstacle/Allclean | 2 +- 48 files changed, 121 insertions(+), 166 deletions(-) diff --git a/bin/tools/CleanFunctions b/bin/tools/CleanFunctions index 90f391e08f..5cc441c7cd 100644 --- a/bin/tools/CleanFunctions +++ b/bin/tools/CleanFunctions @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | Website: https://openfoam.org -# \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -42,46 +42,39 @@ cleanCase() done rm -rf ./[1-9]* ./-[1-9]* ./log ./log.* ./logSummary.* \ - ./*.OpenFOAM ./*.blockMesh ./*.foam ./.setSet > /dev/null 2>&1 + ./*.OpenFOAM ./*.blockMesh ./*.foam ./.setSet - if [ -d system -a -d dynamicCode ] - then - rm -rf dynamicCode > /dev/null 2>&1 - fi + [ -d system ] && [ -d dynamicCode ] && rm -rf dynamicCode - rm -rf processor* > /dev/null 2>&1 - rm -rf jobInfo > /dev/null 2>&1 - rm -rf postProcessing > /dev/null 2>&1 - rm -rf TDAC > /dev/null 2>&1 + rm -rf processor* + rm -rf jobInfo + rm -rf postProcessing + rm -rf TDAC - if [ -d constant/polyMesh ] - then - rm -rf constant/polyMesh > /dev/null 2>&1 - fi - if [ -d constant ] - then - (cd constant && \ - rm -rf \ - cellToRegion cellLevel* pointLevel* \ - > /dev/null 2>&1 \ - ) - fi + rm -rf constant/polyMesh + rm -f constant/cellToRegion \ + constant/cellLevel* \ + constant/pointLevel* - rm -rf constant/tetDualMesh > /dev/null 2>&1 - rm -rf VTK > /dev/null 2>&1 - rm -rf sequencedVTK > /dev/null 2>&1 + rm -rf constant/tetDualMesh - rm -rf 0/polyMesh 0/cellLevel 0/pointLevel 0/cellDist constant/cellDecomposition + rm -rf VTK + rm -rf sequencedVTK - if [ -e system/blockMeshDict.m4 ] - then - rm -f system/blockMeshDict > /dev/null 2>&1 - fi + rm -rf 0/polyMesh 0/cellLevel \ + 0/pointLevel 0/cellDist \ + constant/cellDecomposition find . -name "*.orig" -type f -exec sh -c 'rm -f ${0%.*} ${0%.*}.gz' {} \; } +cleanExplicitFeatures() +{ + rm -rf constant/extendedFeatureEdgeMesh + rm -f constant/geometry/*.eMesh* +} + cleanVoFCase() { cleanCase diff --git a/tutorials/Allclean b/tutorials/Allclean index b4bd491030..dfd1cc3b27 100755 --- a/tutorials/Allclean +++ b/tutorials/Allclean @@ -9,7 +9,7 @@ echo "Removing backup files" find . -type f \( -name "*~" -o -name "*.bak" \) -exec rm {} \; find . \( -name core -o -name 'core.[1-9]*' \) -exec rm {} \; find . \( -name '*.pvs' -o -name '*.OpenFOAM' \) -exec rm {} \; -rm logs testLoopReport > /dev/null 2>&1 +rm -rf logs testLoopReport foamCleanTutorials cases diff --git a/tutorials/basic/laplacianFoam/flange/Allclean b/tutorials/basic/laplacianFoam/flange/Allclean index c9b3f9f8d4..36f31c401a 100755 --- a/tutorials/basic/laplacianFoam/flange/Allclean +++ b/tutorials/basic/laplacianFoam/flange/Allclean @@ -5,7 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions cleanCase -rm -rf EnSight Ensight Fieldview > /dev/null 2>&1 -rm -f constant/polyMesh/boundary > /dev/null 2>&1 +rm -rf EnSight Ensight Fieldview #------------------------------------------------------------------------------ diff --git a/tutorials/basic/potentialFoam/cylinder/Allclean b/tutorials/basic/potentialFoam/cylinder/Allclean index e7d07c89d3..eac999fcbb 100755 --- a/tutorials/basic/potentialFoam/cylinder/Allclean +++ b/tutorials/basic/potentialFoam/cylinder/Allclean @@ -4,8 +4,10 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -find 0 -type f ! -name "*.*" -delete > /dev/null 2>&1 +find 0 -type f ! -name "*.*" -delete cleanCase +rm -rf constant + #------------------------------------------------------------------------------ diff --git a/tutorials/basic/potentialFoam/pitzDaily/Allclean b/tutorials/basic/potentialFoam/pitzDaily/Allclean index e7d07c89d3..eac999fcbb 100755 --- a/tutorials/basic/potentialFoam/pitzDaily/Allclean +++ b/tutorials/basic/potentialFoam/pitzDaily/Allclean @@ -4,8 +4,10 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -find 0 -type f ! -name "*.*" -delete > /dev/null 2>&1 +find 0 -type f ! -name "*.*" -delete cleanCase +rm -rf constant + #------------------------------------------------------------------------------ diff --git a/tutorials/combustion/XiEngineFoam/kivaTest/Allclean b/tutorials/combustion/XiEngineFoam/kivaTest/Allclean index 6904a7f0e6..4a92f93916 100755 --- a/tutorials/combustion/XiEngineFoam/kivaTest/Allclean +++ b/tutorials/combustion/XiEngineFoam/kivaTest/Allclean @@ -7,9 +7,8 @@ cd ${0%/*} || exit 1 # Run from this directory mv ./-180 temp180 cleanCase -rm -rf 0 > /dev/null 2>&1 -rm -f constant/polyMesh/boundary > /dev/null 2>&1 +rm -rf 0 mv temp180 ./-180 -#------------------------------------------------------------------------------ \ No newline at end of file +#------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean index 4fbc9b00f8..1e3b57ddc5 100755 --- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean +++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean @@ -5,6 +5,6 @@ cd "${0%/*}" || exit 1 # Run from this directory . "$WM_PROJECT_DIR/bin/tools/CleanFunctions" cleanCase -rm -rf constant/polyMesh/boundary 0/pointPriority +rm -f 0/pointPriority #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean b/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean index 6454204f7b..3913bfe933 100755 --- a/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean +++ b/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean @@ -5,10 +5,10 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions # Remove surface -rm -f constant/geometry/NACA0012.obj.gz > /dev/null 2>&1 +rm -f constant/geometry/NACA0012.obj.gz cleanCase -rm constant/geometry/boundaryLayer.obj > /dev/null 2>&1 +rm -f constant/geometry/boundaryLayer.obj #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/Allclean b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/Allclean index 21fa718f44..5ec6367863 100755 --- a/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/Allclean +++ b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/Allclean @@ -4,8 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 - cleanCase +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/Allclean b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/Allclean index 972da44d34..6b45f82a41 100755 --- a/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/Allclean +++ b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/Allclean @@ -5,6 +5,5 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions cleanCase -rm -f constant/polyMesh/boundary > /dev/null 2>&1 #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean b/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean index 16ccadd1d3..c3aa48dbe5 100755 --- a/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean +++ b/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean @@ -5,11 +5,11 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions # Remove surface -rm -f constant/geometry/NACA0012.obj.gz > /dev/null 2>&1 +rm -f constant/geometry/NACA0012.obj.gz cleanCase -rm 0/Ma > /dev/null 2>&1 -rm constant/geometry/boundaryLayer.obj > /dev/null 2>&1 +rm -f 0/Ma +rm -f constant/geometry/boundaryLayer.obj #------------------------------------------------------------------------------ diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean index 36f3cdc151..767e8cde88 100755 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions cleanCase -rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1 +rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform #------------------------------------------------------------------------------ diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean index 36f3cdc151..767e8cde88 100755 --- a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean +++ b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions cleanCase -rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1 +rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform #------------------------------------------------------------------------------ diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean index 36f3cdc151..767e8cde88 100755 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions cleanCase -rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1 +rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform #------------------------------------------------------------------------------ diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean index 36f3cdc151..767e8cde88 100755 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions cleanCase -rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1 +rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform #------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean index eabb05d8f4..c26adb8a78 100755 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean @@ -6,7 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase rm -rf constant/baffle3DRegion -rm -rf constant/polyMesh/boundary rm -rf 0 #------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allclean b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allclean index 469b55885f..ecb5fdf0a7 100755 --- a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allclean +++ b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allclean @@ -8,7 +8,6 @@ cleanCase rm -rf comms -killall externalSolver > /dev/null 2>&1 - +killall -q externalSolver #------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/Allclean index ad61afc43a..339e4c11bb 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/Allclean +++ b/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/Allclean @@ -20,7 +20,7 @@ removeRegionDirs () cleanCase removeRegionDirs -rm -rf 0 > /dev/null 2>&1 -rm -rf constant/regionProperties > /dev/null 2>&1 +rm -rf 0 +rm -f constant/regionProperties #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/icoFoam/elbow/Allclean b/tutorials/incompressible/icoFoam/elbow/Allclean index f2da619e3d..9f2f94c2ea 100755 --- a/tutorials/incompressible/icoFoam/elbow/Allclean +++ b/tutorials/incompressible/icoFoam/elbow/Allclean @@ -4,7 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm -f constant/polyMesh/boundary > /dev/null 2>&1 rm -rf fluentInterface cleanCase diff --git a/tutorials/incompressible/pimpleFoam/RAS/propeller/Allclean b/tutorials/incompressible/pimpleFoam/RAS/propeller/Allclean index f0f3c99759..7817f9ed55 100755 --- a/tutorials/incompressible/pimpleFoam/RAS/propeller/Allclean +++ b/tutorials/incompressible/pimpleFoam/RAS/propeller/Allclean @@ -5,11 +5,9 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions # Remove surfaces -rm -f constant/geometry/propeller*.obj.gz > /dev/null 2>&1 +rm -f constant/geometry/propeller*.obj.gz cleanCase - -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/geometry/*.eMesh* > /dev/null 2>&1 +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allclean b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allclean index bf98fa6419..6b45f82a41 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allclean +++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allclean @@ -6,8 +6,4 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -# Delete OBJ files that are created by createPatch, -# when 'dumpCyclicMatches' set to true. -rm -f $objFiles > /dev/null 2>&1 - #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean index c9d0c1e875..d92065a86e 100755 --- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean +++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean @@ -4,11 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm *.obj > /dev/null 2>&1 -rm -r constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm constant/geometry/boundaryAndFaceZones.eMesh > /dev/null 2>&1 -rm constant/polyMesh/boundary > /dev/null 2>&1 +rm -f *.obj cleanCase +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/Allclean b/tutorials/incompressible/simpleFoam/airFoil2D/Allclean index c89fe3143e..343f0e124c 100755 --- a/tutorials/incompressible/simpleFoam/airFoil2D/Allclean +++ b/tutorials/incompressible/simpleFoam/airFoil2D/Allclean @@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Clean time directories only rm -rf *[1-9]* -rm -f log.* 2>/dev/null +rm -f log.* #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allclean b/tutorials/incompressible/simpleFoam/motorBike/Allclean index 06078b5cb3..9561a9def7 100755 --- a/tutorials/incompressible/simpleFoam/motorBike/Allclean +++ b/tutorials/incompressible/simpleFoam/motorBike/Allclean @@ -5,10 +5,9 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions # Remove surface and features -rm -f constant/geometry/motorBike.obj.gz > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/geometry/motorBike.eMesh > /dev/null 2>&1 +rm -f constant/geometry/motorBike.obj.gz cleanCase +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/simpleFoam/rotorDisk/Allclean b/tutorials/incompressible/simpleFoam/rotorDisk/Allclean index 53a645efcf..af6bff7ee0 100755 --- a/tutorials/incompressible/simpleFoam/rotorDisk/Allclean +++ b/tutorials/incompressible/simpleFoam/rotorDisk/Allclean @@ -3,11 +3,7 @@ # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -# remove surface and features -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/geometry/rotatingZone.eMesh > /dev/null 2>&1 -rm -f constant/geometry/fixed.eMesh > /dev/null 2>&1 -rm -f 0/pointLevel > /dev/null 2>&1 -rm -f 0/cellLevel > /dev/null 2>&1 - cleanCase +cleanExplicitFeatures + +#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean index 454c996982..5aff71920a 100755 --- a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean +++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean @@ -5,9 +5,6 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions cleanCase - -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/geometry/buildings.eMesh > /dev/null 2>&1 -rm -f constant/polyMesh/boundary > /dev/null 2>&1 +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyHexMesh/blob/Allclean b/tutorials/mesh/foamyHexMesh/blob/Allclean index eb529207da..205d3b4044 100755 --- a/tutorials/mesh/foamyHexMesh/blob/Allclean +++ b/tutorials/mesh/foamyHexMesh/blob/Allclean @@ -6,20 +6,19 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -rm -rf 0 > /dev/null 2>&1 +rm -rf 0 -rm -rf constant/cellAlignments > /dev/null 2>&1 -rm -rf constant/targetCellSize > /dev/null 2>&1 -rm -rf constant/internalDelaunayVertices > /dev/null 2>&1 +rm -f constant/cellAlignments +rm -f constant/targetCellSize +rm -f constant/internalDelaunayVertices -rm -rf constant/backgroundMeshDecomposition/polyMesh/boundary > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/faces > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/neighbour > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/owner > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/points > /dev/null 2>&1 +for f in points faces owner neighbour boundary +do + rm -f constant/backgroundMeshDecomposition/polyMesh/$f +done -rm -rf snapToSurface?.obj > /dev/null 2>&1 -rm -rf tetsToSnapTo.obj > /dev/null 2>&1 +rm -f snapToSurface?.obj +rm -f tetsToSnapTo.obj #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyHexMesh/flange/Allclean b/tutorials/mesh/foamyHexMesh/flange/Allclean index c6c3bbaf7a..c4ec4a4829 100755 --- a/tutorials/mesh/foamyHexMesh/flange/Allclean +++ b/tutorials/mesh/foamyHexMesh/flange/Allclean @@ -4,21 +4,20 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm -r constant/geometry/flange.stl.gz > /dev/null 2>&1 +rm -f constant/geometry/flange.stl.gz -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -r constant/ccx constant/ccy constant/ccz > /dev/null 2>&1 -rm -r constant/internalDelaunayVertices constant/targetCellSize > /dev/null 2>&1 -rm -r 0 > /dev/null 2>&1 +rm -f constant/ccx constant/ccy constant/ccz +rm -f constant/internalDelaunayVertices constant/targetCellSize +rm -rf 0 -rm -rf constant/backgroundMeshDecomposition/polyMesh/boundary > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/faces > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/neighbour > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/owner > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/points > /dev/null 2>&1 +for f in points faces owner neighbour boundary +do + rm -f constant/backgroundMeshDecomposition/polyMesh/$f +done -rm -r *.obj > /dev/null 2>&1 +rm -rf *.obj cleanCase +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean b/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean index 302df3f094..588f07efbf 100755 --- a/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean +++ b/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean @@ -4,19 +4,18 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm -r constant/extendedFeatureEdgeMesh constant/internalDelaunayVertices > /dev/null 2>&1 -rm constant/geometry/*.eMesh > /dev/null 2>&1 -rm constant/geometry/*_orient* > /dev/null 2>&1 -rm -r constant/polyMesh > /dev/null 2>&1 -rm -r constant/polyMesh > /dev/null 2>&1 -rm -r constant/tetDualMesh > /dev/null 2>&1 +rm -rf constant/internalDelaunayVertices +rm -f constant/geometry/*_orient* +rm -rf constant/polyMesh +rm -rf constant/tetDualMesh -rm -r snapToSurface?.obj tetsToSnapTo.obj > /dev/null 2>&1 +rm -f snapToSurface?.obj tetsToSnapTo.obj -rm domain coneAndSphere > /dev/null 2>&1 +rm -f domain coneAndSphere -rm -rf 0/ +rm -rf 0 cleanCase +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean index bb3bf4d1f7..9b04660899 100755 --- a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean +++ b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean @@ -4,13 +4,11 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -rf constant/geometry/jaggedBoundary.eMesh > /dev/null 2>&1 -rm -rf constant/polyMesh > /dev/null 2>&1 +rm -rf constant/polyMesh -rm -rf MeshedSurface.obj > /dev/null 2>&1 +rm -f MeshedSurface*.obj cleanCase - +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyQuadMesh/square/Allclean b/tutorials/mesh/foamyQuadMesh/square/Allclean index 5dc443babb..9b04660899 100755 --- a/tutorials/mesh/foamyQuadMesh/square/Allclean +++ b/tutorials/mesh/foamyQuadMesh/square/Allclean @@ -4,13 +4,11 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -rf constant/geometry/unit_cube.eMesh > /dev/null 2>&1 -rm -rf constant/polyMesh > /dev/null 2>&1 +rm -rf constant/polyMesh -rm -rf MeshedSurface*.obj > /dev/null 2>&1 +rm -f MeshedSurface*.obj cleanCase - +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/Allclean b/tutorials/mesh/refineMesh/refineFieldDirs/Allclean index 5734444f4e..dc74527b02 100755 --- a/tutorials/mesh/refineMesh/refineFieldDirs/Allclean +++ b/tutorials/mesh/refineMesh/refineFieldDirs/Allclean @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm -rf 0 > /dev/null 2>&1 +rm -rf 0 cleanCase diff --git a/tutorials/mesh/snappyHexMesh/flange/Allclean b/tutorials/mesh/snappyHexMesh/flange/Allclean index f9aef21fd5..cf7594860a 100755 --- a/tutorials/mesh/snappyHexMesh/flange/Allclean +++ b/tutorials/mesh/snappyHexMesh/flange/Allclean @@ -7,12 +7,10 @@ cd ${0%/*} || exit 1 # Run from this directory # Remove surface rm -f constant/geometry/flange.stl.gz -rm -rf 0 > /dev/null 2>&1 -rm -f ./flange ./*.obj > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/geometry/flange.eMesh > /dev/null 2>&1 -rm -f constant/polyMesh/boundary +rm -rf 0 +rm -f ./flange ./*.obj cleanCase +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/snappyHexMesh/pipe/Allclean b/tutorials/mesh/snappyHexMesh/pipe/Allclean index 6b2d801d2a..ca43cd9241 100755 --- a/tutorials/mesh/snappyHexMesh/pipe/Allclean +++ b/tutorials/mesh/snappyHexMesh/pipe/Allclean @@ -7,8 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Remove surface rm -rf constant/geometry -rm -rf constant/extendedFeatureEdgeMesh - cleanCase +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean b/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean index 57c93208bc..16ce8bc1ed 100755 --- a/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean +++ b/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean @@ -4,9 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm -rf constant/polyMesh/sets > /dev/null 2>&1 -rm -rf 0/polyMesh > /dev/null 2>&1 -rm system/topoSetDict > /dev/null 2>&1 +rm -rf constant/polyMesh/sets +rm -rf 0/polyMesh +rm -f system/topoSetDict cleanCase #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean b/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean index 2fab81ad38..f5dc61f8c6 100755 --- a/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean +++ b/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm system/topoSetDict > /dev/null 2>&1 +rm -f system/topoSetDict cleanCase #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean b/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean index 57c93208bc..16ce8bc1ed 100755 --- a/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean +++ b/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean @@ -4,9 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm -rf constant/polyMesh/sets > /dev/null 2>&1 -rm -rf 0/polyMesh > /dev/null 2>&1 -rm system/topoSetDict > /dev/null 2>&1 +rm -rf constant/polyMesh/sets +rm -rf 0/polyMesh +rm -f system/topoSetDict cleanCase #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allclean b/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allclean index c89fe3143e..343f0e124c 100755 --- a/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allclean +++ b/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allclean @@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Clean time directories only rm -rf *[1-9]* -rm -f log.* 2>/dev/null +rm -f log.* #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allclean b/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allclean index 473383859a..b721a2d6e6 100755 --- a/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allclean +++ b/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions cleanCase -rm system/topoSetDict > /dev/null 2>&1 +rm -f system/topoSetDict #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean b/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean index 829fdedcc1..a9552f1bba 100755 --- a/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean +++ b/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean @@ -5,10 +5,9 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions # Remove surface -rm -f constant/geometry/DTC-scaled.stl.gz > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/geometry/DTC-scaled.eMesh > /dev/null 2>&1 +rm -f constant/geometry/DTC-scaled.stl.gz cleanCase +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/RAS/DTCHullMoving/Allclean b/tutorials/multiphase/interFoam/RAS/DTCHullMoving/Allclean index 829fdedcc1..a9552f1bba 100755 --- a/tutorials/multiphase/interFoam/RAS/DTCHullMoving/Allclean +++ b/tutorials/multiphase/interFoam/RAS/DTCHullMoving/Allclean @@ -5,10 +5,9 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions # Remove surface -rm -f constant/geometry/DTC-scaled.stl.gz > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/geometry/DTC-scaled.eMesh > /dev/null 2>&1 +rm -f constant/geometry/DTC-scaled.stl.gz cleanCase +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/RAS/DTCHullWave/Allclean b/tutorials/multiphase/interFoam/RAS/DTCHullWave/Allclean index 829fdedcc1..a9552f1bba 100755 --- a/tutorials/multiphase/interFoam/RAS/DTCHullWave/Allclean +++ b/tutorials/multiphase/interFoam/RAS/DTCHullWave/Allclean @@ -5,10 +5,9 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions # Remove surface -rm -f constant/geometry/DTC-scaled.stl.gz > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/geometry/DTC-scaled.eMesh > /dev/null 2>&1 +rm -f constant/geometry/DTC-scaled.stl.gz cleanCase +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allclean b/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allclean index f551494bd3..208eecded8 100755 --- a/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allclean +++ b/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allclean @@ -5,11 +5,9 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions # Remove surfaces -rm -f constant/geometry/mixerVessel*.stl.gz > /dev/null 2>&1 +rm -f constant/geometry/mixerVessel*.stl.gz cleanCase - -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/geometry/*.eMesh* > /dev/null 2>&1 +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/RAS/planingHullW3/Allclean b/tutorials/multiphase/interFoam/RAS/planingHullW3/Allclean index 6efdb144d3..6feb96c14a 100755 --- a/tutorials/multiphase/interFoam/RAS/planingHullW3/Allclean +++ b/tutorials/multiphase/interFoam/RAS/planingHullW3/Allclean @@ -5,11 +5,9 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions # Remove surface -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/geometry/w3.eMesh > /dev/null 2>&1 -rm -f constant/geometry/w3.stl > /dev/null 2>&1 -rm -rf sequencedVTK > /dev/null 2>&1 +rm -f constant/geometry/w3.stl cleanCase +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/RAS/propeller/Allclean b/tutorials/multiphase/interFoam/RAS/propeller/Allclean index f0f3c99759..7817f9ed55 100755 --- a/tutorials/multiphase/interFoam/RAS/propeller/Allclean +++ b/tutorials/multiphase/interFoam/RAS/propeller/Allclean @@ -5,11 +5,9 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions # Remove surfaces -rm -f constant/geometry/propeller*.obj.gz > /dev/null 2>&1 +rm -f constant/geometry/propeller*.obj.gz cleanCase - -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/geometry/*.eMesh* > /dev/null 2>&1 +cleanExplicitFeatures #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean b/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean index ac0e3978c2..8340b33653 100755 --- a/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean +++ b/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm 0/alpha.water.gz 0/alpha.water 2>/dev/null +rm -f 0/alpha.water.gz 0/alpha.water rm -rf *Flux cleanCase diff --git a/tutorials/multiphase/interFoam/laminar/containerDischarge2D/Allclean b/tutorials/multiphase/interFoam/laminar/containerDischarge2D/Allclean index a5c1dbfe65..5083ba506b 100755 --- a/tutorials/multiphase/interFoam/laminar/containerDischarge2D/Allclean +++ b/tutorials/multiphase/interFoam/laminar/containerDischarge2D/Allclean @@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm 0/alpha.liquid.gz 0/alpha.liquid 2>/dev/null +rm -f 0/alpha.liquid.gz 0/alpha.liquid cleanCase diff --git a/tutorials/multiphase/interFoam/laminar/damBreakWithObstacle/Allclean b/tutorials/multiphase/interFoam/laminar/damBreakWithObstacle/Allclean index 8a15df0ff4..b6965afdc4 100755 --- a/tutorials/multiphase/interFoam/laminar/damBreakWithObstacle/Allclean +++ b/tutorials/multiphase/interFoam/laminar/damBreakWithObstacle/Allclean @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm system/cellSetDict > /dev/null 2>&1 +rm -f system/cellSetDict cleanCase