ENH: autoHexMesh: allow location-in-mesh to be made into a cellZone

Normally the location-in-mesh is equivalent to a cellZone -1. This can
now be overridden by a surface-specified cellZone as before.
This commit is contained in:
mattijs
2015-12-10 11:50:42 +00:00
parent 3e48a99c5f
commit ff56809375
4 changed files with 152 additions and 15 deletions

View File

@ -58,6 +58,7 @@ Description
#include "globalIndex.H"
#include "IOmanip.H"
#include "decompositionModel.H"
#include "fvMeshTools.H"
using namespace Foam;
@ -813,6 +814,7 @@ int main(int argc, char *argv[])
readScalar(meshDict.lookup("mergeTolerance"))
);
const Switch keepPatches(meshDict.lookupOrDefault("keepPatches", false));
// Read decomposePar dictionary
@ -1517,6 +1519,12 @@ int main(int argc, char *argv[])
motionDict
);
// Remove zero sized patches originating from faceZones
if (!keepPatches && !wantSnap && !wantLayers)
{
fvMeshTools::removeEmptyPatches(mesh, true);
}
writeMesh
(
"Refined mesh",
@ -1559,6 +1567,12 @@ int main(int argc, char *argv[])
snapParams
);
// Remove zero sized patches originating from faceZones
if (!keepPatches && !wantLayers)
{
fvMeshTools::removeEmptyPatches(mesh, true);
}
writeMesh
(
"Snapped mesh",
@ -1609,6 +1623,12 @@ int main(int argc, char *argv[])
distributor
);
// Remove zero sized patches originating from faceZones
if (!keepPatches)
{
fvMeshTools::removeEmptyPatches(mesh, true);
}
writeMesh
(
"Layer mesh",
@ -1622,6 +1642,7 @@ int main(int argc, char *argv[])
}
{
// Check final mesh
Info<< "Checking final mesh ..." << endl;