]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Clean up delete_duplicated_vertices() a little. 13719/head
authorDavid Wells <drwells@email.unc.edu>
Wed, 11 May 2022 14:46:57 +0000 (10:46 -0400)
committerDavid Wells <drwells@email.unc.edu>
Wed, 11 May 2022 16:19:19 +0000 (12:19 -0400)
source/grid/grid_tools.cc

index 3f3cf871d8764c664318c292cf90cbbcc13c2c76..79b29578164c1a1258b11dbe514836c8477e268e 100644 (file)
@@ -744,8 +744,6 @@ namespace GridTools
                              const double                  tol)
   {
     AssertIndexRange(2, vertices.size());
-    // create a vector of vertex indices. initialize it to the identity, later
-    // on change that if necessary.
     std::vector<unsigned int> new_vertex_numbers(vertices.size());
     std::iota(new_vertex_numbers.begin(), new_vertex_numbers.end(), 0);
 
@@ -765,14 +763,12 @@ namespace GridTools
     // number of points that need to be compared against each-other in a
     // single set for typical geometries.
     const BoundingBox<spacedim> bbox(vertices);
-    const auto &                min = bbox.get_boundary_points().first;
-    const auto &                max = bbox.get_boundary_points().second;
 
     unsigned int longest_coordinate_direction = 0;
-    double       longest_coordinate_length    = max[0] - min[0];
+    double       longest_coordinate_length    = bbox.side_length(0);
     for (unsigned int d = 1; d < spacedim; ++d)
       {
-        const double coordinate_length = max[d] - min[d];
+        const double coordinate_length = bbox.side_length(d);
         if (longest_coordinate_length < coordinate_length)
           {
             longest_coordinate_length    = coordinate_length;

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.