mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: cvMesh: Code cleanup
This commit is contained in:
@ -791,19 +791,21 @@ Foam::DistributedDelaunayMesh<Triangulation>::rangeInsertReferredWithInfo
|
|||||||
label count = 0;
|
label count = 0;
|
||||||
for (PointIterator it = begin; it != end; ++it)
|
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))
|
if (!bb.contains(samplePoint))
|
||||||
{
|
{
|
||||||
const Foam::point nearestPoint = bb.nearest(samplePoint);
|
const Foam::point nearestPoint = bb.nearest(samplePoint);
|
||||||
|
|
||||||
const scalar distFromBbSqr = magSqr(nearestPoint - samplePoint);
|
distFromBbSqr = magSqr(nearestPoint - samplePoint);
|
||||||
|
|
||||||
pointsBbDistSqr.append
|
|
||||||
(
|
|
||||||
std::make_pair(distFromBbSqr, count++)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pointsBbDistSqr.append
|
||||||
|
(
|
||||||
|
std::make_pair(distFromBbSqr, count++)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::random_shuffle(pointsBbDistSqr.begin(), pointsBbDistSqr.end());
|
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;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user