From 1eb8b8ef124f06519f4370e49a93c57325771a14 Mon Sep 17 00:00:00 2001 From: graham Date: Mon, 13 Jun 2011 15:44:29 +0100 Subject: [PATCH] ENH: ...nearest... query, remove duplicate map build. --- .../backgroundMeshDecomposition.C | 176 +++++++++++++++++- .../backgroundMeshDecomposition.H | 7 + .../conformalVoronoiMesh.C | 7 - .../conformalVoronoiMesh.H | 8 +- .../conformalVoronoiMeshConformToSurface.C | 87 +-------- 5 files changed, 184 insertions(+), 101 deletions(-) diff --git a/src/mesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/src/mesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C index a5667885ad..e89096b70e 100644 --- a/src/mesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C +++ b/src/mesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C @@ -711,6 +711,17 @@ void Foam::backgroundMeshDecomposition::buildPatchAndTree() Pstream::gatherList(allBackgroundMeshBounds_); Pstream::scatterList(allBackgroundMeshBounds_); + point bbMin(GREAT, GREAT, GREAT); + point bbMax(-GREAT, -GREAT, -GREAT); + + forAll(allBackgroundMeshBounds_, procI) + { + bbMin = min(bbMin, allBackgroundMeshBounds_[procI].min()); + bbMax = max(bbMax, allBackgroundMeshBounds_[procI].max()); + } + + globalBackgroundBounds_ = treeBoundBox(bbMin, bbMax); + if (debug) { OFstream fStr @@ -783,6 +794,7 @@ Foam::backgroundMeshDecomposition::backgroundMeshDecomposition boundaryFacesPtr_(), bFTreePtr_(), allBackgroundMeshBounds_(Pstream::nProcs()), + globalBackgroundBounds_(), decomposeDict_ ( IOobject @@ -1167,6 +1179,9 @@ Foam::labelList Foam::backgroundMeshDecomposition::processorPosition labelList ptProc(pts.size(), -1); + DynamicList