From: Peter Munch Date: Mon, 31 Jul 2023 13:45:56 +0000 (+0200) Subject: Use BB::create_extended() X-Git-Tag: relicensing~635^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be686a6df3aac93139d686ac758e1eff4cf7e4c4;p=dealii.git Use BB::create_extended() --- diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 6d84bbd0ed..d3a663cb5a 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -2849,16 +2849,7 @@ namespace GridTools !relevant_cell_bounding_boxes_rtree->empty()) { // create a bounding box around point p with 2*tolerance as side length. - auto p1 = p; - auto p2 = p; - - for (unsigned int d = 0; d < spacedim; ++d) - { - p1[d] = p1[d] - tolerance; - p2[d] = p2[d] + tolerance; - } - - BoundingBox bb({p1, p2}); + const auto bb = BoundingBox(p).create_extended(tolerance); if (relevant_cell_bounding_boxes_rtree->qbegin( boost::geometry::index::intersects(bb)) ==