From 868a090243a011484384203f6038db4f4ce3d861 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 16 Jan 2013 17:08:26 +0000 Subject: [PATCH 1/5] BUG: snappyHexMesh: synchronisation when patch edges align with processor edges --- .../autoHexMeshDriver/autoLayerDriver.C | 42 ++++- .../autoHexMeshDriver/autoLayerDriverShrink.C | 110 +++++++++++++- .../algorithms/PointEdgeWave/PointEdgeWave.C | 143 ++++++++++++------ 3 files changed, 245 insertions(+), 50 deletions(-) diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index d0e43dbb10..b224ef609d 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -293,6 +293,46 @@ void Foam::autoLayerDriver::handleNonManifolds } } + // 3. Remote check for end of layer across coupled boundaries + { + PackedBoolList isCoupledEdge(mesh.nEdges()); + + const labelList& cpEdges = mesh.globalData().coupledPatchMeshEdges(); + forAll(cpEdges, i) + { + isCoupledEdge[cpEdges[i]] = true; + } + syncTools::syncEdgeList + ( + mesh, + isCoupledEdge, + orEqOp(), + 0 + ); + + forAll(edgeGlobalFaces, edgeI) + { + label meshEdgeI = meshEdges[edgeI]; + + if + ( + pp.edgeFaces()[edgeI].size() == 1 + && edgeGlobalFaces[edgeI].size() == 1 + && isCoupledEdge[meshEdgeI] + ) + { + // Edge of patch but no continuation across processor. + const edge& e = pp.edges()[edgeI]; + //Pout<< "** Stopping extrusion on edge " + // << pp.localPoints()[e[0]] + // << pp.localPoints()[e[1]] << endl; + nonManifoldPoints.insert(pp.meshPoints()[e[0]]); + nonManifoldPoints.insert(pp.meshPoints()[e[1]]); + } + } + } + + label nNonManif = returnReduce(nonManifoldPoints.size(), sumOp