]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use the new constructor for Mapping::get_bounding_box()
authorLuca Heltai <luca.heltai@sissa.it>
Fri, 10 May 2019 08:56:50 +0000 (10:56 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Fri, 10 May 2019 16:11:10 +0000 (18:11 +0200)
source/fe/mapping.cc

index 45a1371568d281a8e33f3a1842ab115991dfd4c5..3716dac5d14590e775bd746a3ace1c0c94b7c5c4 100644 (file)
@@ -69,17 +69,7 @@ Mapping<dim, spacedim>::get_bounding_box(
   if (preserves_vertex_locations())
     return cell->bounding_box();
   else
-    {
-      const auto      vertices = get_vertices(cell);
-      Point<spacedim> p0 = vertices[0], p1 = vertices[0];
-      for (unsigned int j = 1; j < vertices.size(); ++j)
-        for (unsigned int d = 0; d < spacedim; ++d)
-          {
-            p0[d] = std::min(p0[d], vertices[j][d]);
-            p1[d] = std::max(p1[d], vertices[j][d]);
-          }
-      return BoundingBox<spacedim>({p0, p1});
-    }
+    return BoundingBox<spacedim>(get_vertices(cell));
 }
 
 

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.