mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: eliminate unnecessary DIY version of cellPoints(label)
This commit is contained in:
@ -91,30 +91,11 @@ void Foam::cuttingSurface::calcCellCuts
|
|||||||
|
|
||||||
|
|
||||||
boundBox cellBb;
|
boundBox cellBb;
|
||||||
labelHashSet cpts;
|
|
||||||
|
|
||||||
for (const label celli : cellCuts)
|
for (const label celli : cellCuts)
|
||||||
{
|
{
|
||||||
cellBb.clear();
|
cellBb.clear();
|
||||||
|
|
||||||
if (fvm.hasCellPoints())
|
|
||||||
{
|
|
||||||
cellBb.add(pts, fvm.cellPoints(celli));
|
cellBb.add(pts, fvm.cellPoints(celli));
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// DIY version of cellPoints
|
|
||||||
cpts.clear();
|
|
||||||
|
|
||||||
const cell& cFaces = cells[celli];
|
|
||||||
|
|
||||||
for (const label facei : cFaces)
|
|
||||||
{
|
|
||||||
cpts.insert(faces[facei]);
|
|
||||||
}
|
|
||||||
|
|
||||||
cellBb.add(pts, cpts);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!cellBb.contains(nearest[celli].hitPoint()))
|
if (!cellBb.contains(nearest[celli].hitPoint()))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -202,8 +202,6 @@ void Foam::distanceSurface::createGeometry()
|
|||||||
: Foam::sign(diff & norms[i]) * Foam::mag(diff)
|
: Foam::sign(diff & norms[i]) * Foam::mag(diff)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Since cellPoints() is used in isoSurfaceCell too,
|
|
||||||
// no additional overhead caused here
|
|
||||||
if (filterCells)
|
if (filterCells)
|
||||||
{
|
{
|
||||||
cellBb.clear();
|
cellBb.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user