]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid some uses of GeometryInfo. 15801/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 5 Aug 2023 10:28:09 +0000 (04:28 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 5 Aug 2023 10:28:09 +0000 (04:28 -0600)
source/grid/grid_generator.cc

index 6c25951c6a46fa40054e1d794f093dd1408adcd5..86669327c50afb2276e9c7eba09f556f2a4f9375 100644 (file)
@@ -3353,7 +3353,7 @@ namespace GridGenerator
     auto min_line_length = [](const Triangulation<2> &tria) -> double {
       double length = std::numeric_limits<double>::max();
       for (const auto &cell : tria.active_cell_iterators())
-        for (unsigned int n = 0; n < GeometryInfo<2>::lines_per_cell; ++n)
+        for (unsigned int n = 0; n < cell->n_lines(); ++n)
           length = std::min(length, cell->line(n)->diameter());
       return length;
     };
@@ -3444,7 +3444,7 @@ namespace GridGenerator
         // grid around the cylinder to the new TFI manifold id.
         if (cell->manifold_id() == tfi_manifold_id)
           {
-            for (const unsigned int face_n : GeometryInfo<2>::face_indices())
+            for (const unsigned int face_n : cell->face_indices())
               {
                 const auto &face = cell->face(face_n);
                 if (face->at_boundary() &&
@@ -3468,7 +3468,7 @@ namespace GridGenerator
       std::numeric_limits<double>::epsilon() * 10000;
     if (colorize)
       for (const auto &cell : tria.active_cell_iterators())
-        for (const unsigned int face_n : GeometryInfo<2>::face_indices())
+        for (const unsigned int face_n : cell->face_indices())
           {
             const auto face = cell->face(face_n);
             if (face->at_boundary())

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.