diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index cd7c13d7833918b5386b977d7a7a04aed077c975..92c92d72e5ae9bacad9c7944aa6d79ff119b5dfa 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -280,11 +280,14 @@ addLayersControls nBufferCellsNoExtrude 0; - // Overall max number of layer addition iterations + // Overall max number of layer addition iterations. The mesher will exit + // if it reaches this number of iterations; possibly with an illegal + // mesh. nLayerIter 50; // Max number of iterations after which relaxed meshQuality controls - // get used. + // get used. Up to nRelaxIter it uses the settings in meshQualityControls, + // after nRelaxIter it uses the values in meshQualityControls::relaxed. nRelaxedIter 20; } diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index 3d23cce5c37ace106ec7af7cbdaf692a7d027011..c6fa2012188efe580b77cd5527572b7a09cfd58f 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -125,6 +125,7 @@ label findPatchID(const polyMesh& mesh, const word& name) int main(int argc, char *argv[]) { +# include "addRegionOption.H" argList::validArgs.append("faceZone"); argList::validArgs.append("patch"); argList::validOptions.insert("additionalPatches", "(patch2 .. patchN)"); @@ -134,7 +135,7 @@ int main(int argc, char *argv[]) # include "setRootCase.H" # include "createTime.H" runTime.functionObjects().off(); -# include "createMesh.H" +# include "createNamedMesh.H" const word oldInstance = mesh.pointsInstance(); const polyBoundaryMesh& patches = mesh.boundaryMesh(); diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 40ba0efadebc02dec26e5de383e6fef0634a6c93..6374722e461ee8cfc7c0781f28782e1b81fff86d 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -516,11 +516,13 @@ void syncPoints int main(int argc, char *argv[]) { +# include "addRegionOption.H" argList::validOptions.insert("overwrite", ""); # include "setRootCase.H" # include "createTime.H" runTime.functionObjects().off(); +# include "createNamedPolyMesh.H" const bool overwrite = args.optionFound("overwrite"); @@ -532,6 +534,11 @@ int main(int argc, char *argv[]) ( "createPatchDict", runTime.system(), + ( + regionName != polyMesh::defaultRegion + ? regionName + : word::null + ), runTime, IOobject::MUST_READ, IOobject::NO_WRITE, @@ -551,7 +558,6 @@ int main(int argc, char *argv[]) coupledPolyPatch::matchTol = tol; -# include "createPolyMesh.H" const word oldInstance = mesh.pointsInstance(); const polyBoundaryMesh& patches = mesh.boundaryMesh(); diff --git a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C index a369a195b8c8dcf1d22b6bb60656993fe04c5417..df419e118b70418f11d54e277dc60f701576855a 100644 --- a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C +++ b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C @@ -60,6 +60,7 @@ int main(int argc, char *argv[]) { argList::validOptions.insert("noFlipMap", ""); +# include "addRegionOption.H" # include "addTimeOptions.H" # include "setRootCase.H" # include "createTime.H" @@ -77,7 +78,7 @@ int main(int argc, char *argv[]) runTime.setTime(Times[startTime], startTime); -# include "createPolyMesh.H" +# include "createNamedPolyMesh.H" // Search for list of objects for the time of the mesh IOobjectList objects diff --git a/src/meshTools/triSurface/triangleFuncs/triangleFuncs.C b/src/meshTools/triSurface/triangleFuncs/triangleFuncs.C index dab51b47148cb3f83a7aac2bbffd8009800f53b6..e3f4983ffe6a01110746c7d238221549b5601a82 100644 --- a/src/meshTools/triSurface/triangleFuncs/triangleFuncs.C +++ b/src/meshTools/triSurface/triangleFuncs/triangleFuncs.C @@ -115,7 +115,7 @@ bool Foam::triangleFuncs::intersectAxesBundle // V10:(-1.285715 8.99165e-16 -1.142858) // V20:(0 0 -1.678573) // i0:0 - if (Foam::mag(det)/localScale < SMALL) + if (localScale < VSMALL || Foam::mag(det)/localScale < SMALL) { // Triangle parallel to dir return false;