diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index 957010dc10..788b154a6e 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -143,11 +143,19 @@ castellatedMeshControls } } - // Optional angle to detect small-large cell situation perpendicular - // to the surface. Is the angle of face w.r.t the local surface - // normal. Use on flat(ish) surfaces only. Otherwise - // leave out or set to negative number. + //- Optional angle to detect small-large cell situation + // perpendicular to the surface. Is the angle of face w.r.t. + // the local surface normal. Use on flat(ish) surfaces only. + // Otherwise leave out or set to negative number. //perpendicularAngle 10; + + + //- Optional faceZone and (for closed surface) cellZone with + // how to select the cells that are in the cellZone + // (inside / outside / specified insidePoint) + //faceZone sphere; + //cellZone sphere; + //cellZoneInside inside; //outside/insidePoint } } diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C index 7d90fdc450..12298ce6e1 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C @@ -258,6 +258,8 @@ void Foam::meshRefinement::checkData() meshCutter_.checkRefinementLevels(1, labelList(0)); + label nBnd = mesh_.nFaces()-mesh_.nInternalFaces(); + Pout<< "meshRefinement::checkData() : Checking synchronization." << endl; @@ -267,7 +269,7 @@ void Foam::meshRefinement::checkData() pointField::subList boundaryFc ( mesh_.faceCentres(), - mesh_.nFaces()-mesh_.nInternalFaces(), + nBnd, mesh_.nInternalFaces() ); @@ -292,8 +294,8 @@ void Foam::meshRefinement::checkData() // Check meshRefinement { // Get boundary face centre and level. Coupled aware. - labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces()); - pointField neiCc(mesh_.nFaces()-mesh_.nInternalFaces()); + labelList neiLevel(nBnd); + pointField neiCc(nBnd); calcNeighbourData(neiLevel, neiCc); // Collect segments we want to test for @@ -327,11 +329,22 @@ void Foam::meshRefinement::checkData() surfaceLevel ); } + // Get the coupled hit + labelList neiHit + ( + SubList