diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C index 9a5351a1f4..b2ed781b8b 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C @@ -791,19 +791,21 @@ Foam::DistributedDelaunayMesh::rangeInsertReferredWithInfo label count = 0; for (PointIterator it = begin; it != end; ++it) { - const pointFromPoint samplePoint = topoint(it->point()); + const Foam::point samplePoint(topoint(it->point())); + + scalar distFromBbSqr = 0; if (!bb.contains(samplePoint)) { const Foam::point nearestPoint = bb.nearest(samplePoint); - const scalar distFromBbSqr = magSqr(nearestPoint - samplePoint); - - pointsBbDistSqr.append - ( - std::make_pair(distFromBbSqr, count++) - ); + distFromBbSqr = magSqr(nearestPoint - samplePoint); } + + pointsBbDistSqr.append + ( + std::make_pair(distFromBbSqr, count++) + ); } std::random_shuffle(pointsBbDistSqr.begin(), pointsBbDistSqr.end()); diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControl/cellShapeControl.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControl/cellShapeControl.C index 102f637c09..a6b47f4ab0 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControl/cellShapeControl.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControl/cellShapeControl.C @@ -572,7 +572,9 @@ void Foam::cellShapeControl::initialMeshPopulation ); } - Info<< " Inserted " << (pts.size() - nRejected) << "/" << pts.size() + Info<< " Inserted " + << returnReduce(pts.size() - nRejected, sumOp