diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index b7c365133e..326d03f82c 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -1649,7 +1649,6 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh cvMeshDict.subDict("motionControl") ), startOfInternalPoints_(0), - startOfSurfacePoints_(0), featureVertices_(), featurePointLocations_(), featurePointTreePtr_(), @@ -1781,11 +1780,11 @@ void Foam::conformalVoronoiMesh::move() vectorField displacementAccumulator ( - startOfSurfacePoints_, + number_of_vertices(), vector::zero ); - PackedBoolList pointToBeRetained(startOfSurfacePoints_, true); + PackedBoolList pointToBeRetained(number_of_vertices(), true); std::list pointsToInsert; @@ -2084,8 +2083,6 @@ void Foam::conformalVoronoiMesh::move() insertPoints(pointsToInsert); - startOfSurfacePoints_ = number_of_vertices(); - label pointsRemoved = displacementAccumulator.size() - number_of_vertices() diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H index 0a99fa5f83..63746065bc 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H @@ -136,11 +136,6 @@ private: // careful bookkeeping within several functions. label startOfInternalPoints_; - //- Keep track of the start of the surface conformation points - // (including those referred for parallel conformation). Needs - - // careful bookkeeping within several functions. - label startOfSurfacePoints_; - //- Store the feature constraining points to be reinserted after a // triangulation clear List featureVertices_; @@ -167,7 +162,7 @@ private: //- Store the surface and feature edge conformation locations to be // reinserted - List surfaceConformationVertices_; + std::list surfaceConformationVertices_; //- Method for inserting initial points. Runtime selectable. autoPtr initialPointsMethod_; diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index ca400a166b..5e75c90b04 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -103,8 +103,6 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation return; } - startOfSurfacePoints_ = number_of_vertices(); - // Initialise containers to store the edge conformation locations DynamicList newEdgeLocations; @@ -1376,11 +1374,7 @@ void Foam::conformalVoronoiMesh::reportSurfaceConformationQuality() vit++ ) { - if - ( - vit->index() >= startOfSurfacePoints_ - && vit->internalOrBoundaryPoint() - ) + if (vit->ppMaster()) { std::list adjacentVertices; @@ -1407,8 +1401,7 @@ void Foam::conformalVoronoiMesh::reportSurfaceConformationQuality() // The lower indexed vertex will perform the assessment if ( - avh->index() >= startOfSurfacePoints_ - && avh->internalOrBoundaryPoint() + avh->ppMaster() && vit->index() < avh->index() && vit->type() != avh->type() ) @@ -1733,12 +1726,7 @@ void Foam::conformalVoronoiMesh::storeSurfaceConformation() { Info<< nl << "Storing surface conformation" << endl; - surfaceConformationVertices_.setSize - ( - number_of_vertices() - startOfSurfacePoints_ - ); - - label surfPtI = 0; + surfaceConformationVertices_.clear(); for ( @@ -1747,28 +1735,26 @@ void Foam::conformalVoronoiMesh::storeSurfaceConformation() vit++ ) { - if (!vit->referred() && vit->index() >= startOfSurfacePoints_) + if (!vit->referred() && vit->pairPoint()) { - if (!vit->pairPoint()) - { - FatalErrorIn("storeSurfaceConformation()") - << "Trying to store a vertex that is not a surface point" - << exit(FatalError); - } - - surfaceConformationVertices_[surfPtI] = Vb(vit->point()); - - surfaceConformationVertices_[surfPtI].index() = - vit->index() - startOfSurfacePoints_; - - surfaceConformationVertices_[surfPtI].type() = - vit->type() - startOfSurfacePoints_; - - surfPtI++; + surfaceConformationVertices_.push_back + ( + Vb + ( + vit->point(), + 0, // index, reset to zero + vit->type() - vit->index() // type, relative to index + ) + ); } } - Info<< " Stored " << surfaceConformationVertices_.size() + Info<< " Stored " + << returnReduce + ( + label(surfaceConformationVertices_.size()), + sumOp