Commit 262feb6b authored by laurence's avatar laurence
Browse files

ENH: cvMesh: Code cleanup

parent b56d84db
......@@ -791,19 +791,21 @@ Foam::DistributedDelaunayMesh<Triangulation>::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());
......
......@@ -572,7 +572,9 @@ void Foam::cellShapeControl::initialMeshPopulation
);
}
Info<< " Inserted " << (pts.size() - nRejected) << "/" << pts.size()
Info<< " Inserted "
<< returnReduce(pts.size() - nRejected, sumOp<label>())
<< "/" << pts.size()
<< endl;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment