From 17314265fc83d2b4a2f21d779cd9cf3d12d25a04 Mon Sep 17 00:00:00 2001 From: graham Date: Mon, 13 Jun 2011 15:45:27 +0100 Subject: [PATCH] ENH: Create points in a batch before insertion to allow distribution. --- .../conformalVoronoiMesh.C | 72 +++++++++++++++---- .../conformalVoronoiMesh.H | 11 +-- .../conformalVoronoiMeshConformToSurface.C | 2 +- .../conformalVoronoiMeshI.H | 21 +++--- .../conformalVoronoiMesh/indexedVertex.H | 6 ++ 5 files changed, 86 insertions(+), 26 deletions(-) diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index 73433b7ecb..36ac69b238 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -244,7 +244,10 @@ void Foam::conformalVoronoiMesh::insertPoints // Send the points that are not on this processor to the appropriate // place - decomposition_().distributePoints(transferPoints); + Foam::autoPtr map + ( + decomposition_().distributePoints(transferPoints) + ); forAll(transferPoints, tPI) { @@ -269,7 +272,7 @@ void Foam::conformalVoronoiMesh::insertPoints label nVert = number_of_vertices(); - Info<< "TEMPORARILY USING INDIVIDUAL INSERTION" << endl; + Info<< "TEMPORARILY USING INDIVIDUAL INSERTION TO DETECT FAILURE" << endl; // using the range insert (faster than inserting points one by one) // insert(points.begin(), points.end()); for @@ -322,6 +325,10 @@ void Foam::conformalVoronoiMesh::insertSurfacePointPairs << exit(FatalError); } + DynamicList pts; + DynamicList