From 7412ca8952d7e3db30fc217c8cb0ff40111594a1 Mon Sep 17 00:00:00 2001
From: graham <g.macpherson@opencfd.co.uk>
Date: Wed, 15 Jun 2011 16:37:58 +0100
Subject: [PATCH] ENH: Use range insertion.  Move storeSizesAndAlignments out
 of insertInitialPoints.

---
 .../conformalVoronoiMesh.C                    | 36 ++++++++++---------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C
index 9993162a930..5157f3c5800 100644
--- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C
+++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C
@@ -272,18 +272,19 @@ void Foam::conformalVoronoiMesh::insertPoints
 
     label nVert = number_of_vertices();
 
-    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
-    (
-        std::list<Point>::iterator pit=points.begin();
-        pit != points.end();
-        ++pit
-    )
-    {
-        insertVb(*pit);
-    }
+    insert(points.begin(), points.end());
+
+    // Info<< "USING INDIVIDUAL INSERTION TO DETECT FAILURE" << endl;
+    // for
+    // (
+    //     std::list<Point>::iterator pit=points.begin();
+    //     pit != points.end();
+    //     ++pit
+    // )
+    // {
+    //     insertVb(*pit);
+    // }
 
     label nInserted(number_of_vertices() - preInsertionSize);
 
@@ -1167,12 +1168,6 @@ void Foam::conformalVoronoiMesh::insertInitialPoints()
         writePoints("initialPoints.obj", true);
     }
 
-    Info<< "NEED TO CHANGE storeSizesAndAlignments AFTER DISTRIBUTE" << endl;
-    Info<< "NEED TO MAP FEATURE POINTS AFTER DISTRIBUTE" << endl;
-    Info<< "NEED TO ENSURE THAT FEATURE POINTS ARE INSERTED ON THE "
-        << "CORRECT PRCOESSOR" << endl;
-
-    storeSizesAndAlignments(initPts);
 }
 
 
@@ -1808,6 +1803,13 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
 
     insertFeaturePoints();
 
+    Info<< "NEED TO MAP FEATURE POINTS AFTER DISTRIBUTE" << endl;
+    Info<< "NEED TO ENSURE THAT FEATURE POINTS ARE INSERTED ON THE "
+        << "CORRECT PROCESSOR" << endl;
+
+    Info<< "NEED TO CHANGE storeSizesAndAlignments AFTER DISTRIBUTE" << endl;
+    // storeSizesAndAlignments(initPts);
+
     buildSurfaceConformation(rmCoarse);
 
     // The introduction of the surface conformation may have distorted the
-- 
GitLab