From 3b3d69ea5d76ba61df78abe4571e876af258a64c Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Fri, 14 Apr 2023 14:09:08 +0200 Subject: [PATCH] Add tolerance to box in compute_point_locations_try_all --- source/grid/grid_tools.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index c6854b732d..f7fddacd9b 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -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 box = leaf.first.create_extended( + relative_tolerance * leaf.first.side_length(0)); const auto &cell_hint = leaf.second; for (const auto &point_and_id : -- 2.39.5