diff --git a/src/sampling/sampledSurface/isoSurface/isoSurface.C b/src/sampling/sampledSurface/isoSurface/isoSurface.C index 67cd7aebc7..5f1fbdc24b 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurface.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurface.C @@ -108,13 +108,7 @@ Foam::isoSurface::cellCutType Foam::isoSurface::calcCutType break; } - label fp0 = tetBasePtIs_[facei]; - - // Fall back for problem decompositions - if (fp0 < 0) - { - fp0 = 0; - } + const label fp0 = tetBasePtIs_[facei] < 0 ? 0 : tetBasePtIs_[facei]; label fp = f.fcIndex(fp0); for (label i = 2; i < f.size(); i++) @@ -247,37 +241,31 @@ void Foam::isoSurface::fixTetBasePtIs() tetBasePtIs_ = mesh_.tetBasePtIs(); - // Pre-filter: mark all cells with illegal base points - labelHashSet problemCells(cells.size()/128); + // Mark all cells with illegal base points as potentially problematic + PackedBoolList problemCells(cells.size(), false); forAll(tetBasePtIs_, facei) { if (tetBasePtIs_[facei] == -1) { - problemCells.insert(faceOwner[facei]); + problemCells[faceOwner[facei]] = true; if (mesh_.isInternalFace(facei)) { - problemCells.insert(faceNeighbour[facei]); + problemCells[faceNeighbour[facei]] = true; } } } - label nAdapted = 0; - - - // Number of times a point occurs in a cell. Used to detect dangling - // vertices (count = 2) - Map