BUG: processorMeshes removeFiles does not remove collated (fixes #2607)

ENH: extend rmDir to handle removal of empty directories only

- recursively remove directories that only contain other directories
  but no other contents. Treats dead links as non-content.
This commit is contained in:
Mark Olesen
2022-10-05 16:24:46 +02:00
parent 779a2ca084
commit d5cdc60a54
17 changed files with 313 additions and 224 deletions

View File

@ -2,18 +2,22 @@
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
fileHandler="-fileHandler collated"
decomp16="-decomposeParDict system/decomposeParDict.16"
runApplication blockMesh
##- Serial run
#runApplication snappyHexMesh
#runApplication snappyHexMesh -overwrite $fileHandler
#runApplication checkMesh -allTopology -allGeometry
#- Parallel run
runApplication decomposePar
runParallel snappyHexMesh
runParallel checkMesh -allTopology -allGeometry
runParallel -s decompose redistributePar -decompose -constant $fileHandler
runParallel snappyHexMesh -overwrite $fileHandler
runParallel checkMesh -allTopology -allGeometry $fileHandler
#runApplication reconstructParMesh -constant
# runParallel -s redistrib $decomp16 redistributePar -constant $fileHandler
#runApplication reconstructParMesh -constant $fileHandler
#------------------------------------------------------------------------------

View File

@ -10,20 +10,17 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
note "mesh decomposition control dictionary";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- The total number of domains (mandatory)
numberOfSubdomains 8;
//- The decomposition method (mandatory)
method hierarchical;
method hierarchical;
hierarchicalCoeffs
coeffs
{
n (2 2 2);
n (2 2 2);
}
// ************************************************************************* //

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 16;
method scotch;
// ************************************************************************* //