diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index a1e274d2c0..86f4cbd977 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -251,6 +251,7 @@ void Foam::autoLayerDriver::handleNonManifolds ( const indirectPrimitivePatch& pp, const labelList& meshEdges, + const labelListList& edgeGlobalFaces, pointField& patchDisp, labelList& patchNLayers, List& extrudeStatus @@ -268,11 +269,53 @@ void Foam::autoLayerDriver::handleNonManifolds // 1. Local check checkManifold(pp, nonManifoldPoints); + // 2. Remote check for boundary edges on coupled boundaries + forAll(edgeGlobalFaces, edgeI) + { + if + ( + pp.edgeFaces()[edgeI].size() == 1 + && edgeGlobalFaces[edgeI].size() > 2 + ) + { + // So boundary edges that are connected to more than 2 processors + // i.e. a non-manifold edge which is exactly on a processor + // boundary. + const edge& e = pp.edges()[edgeI]; + nonManifoldPoints.insert(pp.meshPoints()[e[0]]); + nonManifoldPoints.insert(pp.meshPoints()[e[1]]); + } + } + + label nNonManif = returnReduce(nonManifoldPoints.size(), sumOp