From 71c0a5d1d7c8205bc948e66800db8743e72910a9 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 18 Oct 2013 11:52:38 +0100 Subject: [PATCH] ENH: autoHexMesh: parallel consistency, fix curvature refinement --- .../autoHexMeshDriver/autoSnapDriver.C | 126 ++++- .../autoHexMeshDriver/autoSnapDriver.H | 16 +- .../autoHexMeshDriver/autoSnapDriverFeature.C | 252 ++++++--- .../meshRefinement/meshRefinement.H | 19 +- .../meshRefinement/meshRefinementRefine.C | 511 ++++++++++++------ 5 files changed, 652 insertions(+), 272 deletions(-) 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