From 9e7ad6e511a4a248d398095a874a6bf7e65eb2dc Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 19 Jul 2019 13:33:26 +0200 Subject: [PATCH] ENH: improvements for isoSurfaceTopo erosion (#1374) - adapted openfoam.org code. Original commit message: Instead of adapting tet base points cell-by-cell, the dangling points are pre-computed and then the adaptations to the base points are made face-by-face. This correctly adapts faces which have different dangling points relative to the owner and neighbour cells. --- .../surface/isoSurface/isoSurfaceTopo.C | 180 +++++++++--------- 1 file changed, 92 insertions(+), 88 deletions(-) diff --git a/src/sampling/surface/isoSurface/isoSurfaceTopo.C b/src/sampling/surface/isoSurface/isoSurfaceTopo.C index 744d995c7b..f2fddbaa1b 100644 --- a/src/sampling/surface/isoSurface/isoSurfaceTopo.C +++ b/src/sampling/surface/isoSurface/isoSurfaceTopo.C @@ -254,126 +254,130 @@ void Foam::isoSurfaceTopo::fixTetBasePtIs() // Pre-filter: mark all cells with illegal base points - labelHashSet problemCells(cells.size()/128); + bitSet problemCells(cells.size()); + forAll(tetBasePtIs_, facei) { if (tetBasePtIs_[facei] == -1) { - problemCells.insert(faceOwner[facei]); + problemCells.set(faceOwner[facei]); + if (mesh_.isInternalFace(facei)) { - problemCells.insert(faceNeighbour[facei]); + problemCells.set(faceNeighbour[facei]); } } } - label nAdapted = 0; + // Mark all points that are shared by just two faces within an adjacent + // problem cell as problematic + bitSet problemPoints(mesh_.points().size()); - - // Number of times a point occurs in a cell. Used to detect dangling - // vertices (count = 2) - Map