diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index bd0d7d696d..58c170ab7b 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -3051,7 +3051,7 @@ void Foam::autoLayerDriver::addLayers // Duplicate points on faceZones that layers are added to - labelList pointToDuplicate; + labelList pointToMaster; { // Check outside of baffles for non-manifoldness @@ -3172,7 +3172,7 @@ void Foam::autoLayerDriver::addLayers if (map.valid()) { // Store point duplication - pointToDuplicate.setSize(mesh.nPoints(), -1); + pointToMaster.setSize(mesh.nPoints(), -1); const labelList& pointMap = map().pointMap(); const labelList& reversePointMap = map().reversePointMap(); @@ -3185,8 +3185,8 @@ void Foam::autoLayerDriver::addLayers if (newMasterPointI != pointI) { // Found slave. Mark both master and slave - pointToDuplicate[pointI] = newMasterPointI; - pointToDuplicate[newMasterPointI] = newMasterPointI; + pointToMaster[pointI] = newMasterPointI; + pointToMaster[newMasterPointI] = newMasterPointI; } } @@ -3248,7 +3248,7 @@ void Foam::autoLayerDriver::addLayers // Now we have // - mesh with optional baffles and duplicated points for faceZones // where layers are to be added - // - pointToDuplicate : correspondence for duplicated points + // - pointToMaster : correspondence for duplicated points // - baffles : list of pairs of faces @@ -3976,13 +3976,26 @@ void Foam::autoLayerDriver::addLayers } - - // Update numbering of baffles + // Use geometric detection of points-to-be-merged + // - detect any boundary face created from a duplicated face (=baffle) + // - on these mark any point created from a duplicated point + if (returnReduce(pointToMaster.size(), sumOp