]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add tolerance to box in compute_point_locations_try_all
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Fri, 14 Apr 2023 12:09:08 +0000 (14:09 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Fri, 14 Apr 2023 12:09:08 +0000 (14:09 +0200)
source/grid/grid_tools.cc

index c6854b732d27f6ce23a0da3258486c563c95de12..f7fddacd9b39955fb78ec4b51fc8f5911783bf92 100644 (file)
@@ -5829,7 +5829,9 @@ namespace GridTools
 
     // Check all points within a given pair of box and cell
     const auto check_all_points_within_box = [&](const auto &leaf) {
-      const auto &box       = leaf.first;
+      const double                relative_tolerance = 1e-12;
+      const BoundingBox<spacedim> box = leaf.first.create_extended(
+        relative_tolerance * leaf.first.side_length(0));
       const auto &cell_hint = leaf.second;
 
       for (const auto &point_and_id :

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.