diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C index 07ff697df6..adb7c38590 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C @@ -910,6 +910,7 @@ void Foam::autoSnapDriver::detectNearSurfaces Info<< "Detecting near surfaces ..." << endl; const pointField& localPoints = pp.localPoints(); + const labelList& meshPoints = pp.meshPoints(); const refinementSurfaces& surfaces = meshRefiner_.surfaces(); const fvMesh& mesh = meshRefiner_.mesh(); @@ -1220,6 +1221,7 @@ void Foam::autoSnapDriver::detectNearSurfaces } + const PackedBoolList isMasterPoint(syncTools::getMasterPoints(mesh)); label nOverride = 0; // 1. All points to non-interface surfaces @@ -1332,7 +1334,7 @@ void Foam::autoSnapDriver::detectNearSurfaces } } - if (override) + if (override && isMasterPoint[meshPoints[pointI]]) { nOverride++; } @@ -1399,8 +1401,6 @@ void Foam::autoSnapDriver::detectNearSurfaces ); - label nOverride = 0; - forAll(hit1, i) { label pointI = zonePointIndices[i]; @@ -1472,7 +1472,7 @@ void Foam::autoSnapDriver::detectNearSurfaces } } - if (override) + if (override && isMasterPoint[meshPoints[pointI]]) { nOverride++; } @@ -1690,7 +1690,13 @@ Foam::vectorField Foam::autoSnapDriver::calcNearestSurface scalarField magDisp(mag(patchDisp)); Info<< "Wanted displacement : average:" - << gSum(magDisp)/returnReduce(patchDisp.size(), sumOp