STYLE: eliminate unnecessary DIY version of cellPoints(label)

This commit is contained in:
Mark Olesen
2018-11-01 14:23:21 +00:00
parent 3366a16b35
commit aa7cce912c
2 changed files with 1 additions and 22 deletions

View File

@ -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()))
{ {

View File

@ -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();