]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use BB::create_extended() 15809/head
authorPeter Munch <peterrmuench@gmail.com>
Mon, 31 Jul 2023 13:45:56 +0000 (15:45 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Mon, 31 Jul 2023 13:46:20 +0000 (15:46 +0200)
source/grid/grid_tools.cc

index 6d84bbd0ede1b137f8a433c065ca6961bc8e4d8a..d3a663cb5a8ffcab9f0f1dd6a1d27b17439a423d 100644 (file)
@@ -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<spacedim> bb({p1, p2});
+        const auto bb = BoundingBox<spacedim>(p).create_extended(tolerance);
 
         if (relevant_cell_bounding_boxes_rtree->qbegin(
               boost::geometry::index::intersects(bb)) ==

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.