From bb35d784a295e2bc96050af5ac51116cc8865c71 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 12 Jul 2019 16:38:04 +0200 Subject: [PATCH] BUG: distanceSurface has gaps in mesh (#1374) - need to be more generous when prefiltering the cell selection --- src/sampling/surface/distanceSurface/distanceSurface.C | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sampling/surface/distanceSurface/distanceSurface.C b/src/sampling/surface/distanceSurface/distanceSurface.C index 2f1c9a511d..04e1236a23 100644 --- a/src/sampling/surface/distanceSurface/distanceSurface.C +++ b/src/sampling/surface/distanceSurface/distanceSurface.C @@ -209,6 +209,9 @@ void Foam::distanceSurface::createGeometry() cellBb.clear(); cellBb.add(fvm.points(), fvm.cellPoints(i)); + // Expand slightly to catch corners + cellBb.inflate(0.1); + if (!cellBb.contains(nearest[i].hitPoint())) { ignoreCells.set(i);