ENH: Use range insertion. Move storeSizesAndAlignments out of insertInitialPoints.

This commit is contained in:
graham
2011-06-15 16:37:58 +01:00
parent ddf76e1a38
commit 7412ca8952

View File

@ -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