]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix warning 17885/head
authorPeter Munch <peterrmuench@gmail.com>
Sun, 24 Nov 2024 20:36:57 +0000 (21:36 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 24 Nov 2024 20:36:57 +0000 (21:36 +0100)
source/grid/manifold_lib.cc

index 2086907bae0072655ef5a51a99294152233378bb..24b3316824353fcbea1350470a8f7f3b62e50160 100644 (file)
@@ -1679,12 +1679,12 @@ TransfiniteInterpolationManifold<dim, spacedim>::initialize(
   for (const auto &cell : triangulation.active_cell_iterators())
     {
       bool cell_is_flat = true;
-      for (unsigned int l = 0; l < GeometryInfo<dim>::lines_per_cell; ++l)
+      for (const auto l : cell->line_indices())
         if (cell->line(l)->manifold_id() != cell->manifold_id() &&
             cell->line(l)->manifold_id() != numbers::flat_manifold_id)
           cell_is_flat = false;
-      if (dim > 2)
-        for (unsigned int q = 0; q < GeometryInfo<dim>::quads_per_cell; ++q)
+      if constexpr (dim > 2)
+        for (const auto q : cell->face_indices())
           if (cell->quad(q)->manifold_id() != cell->manifold_id() &&
               cell->quad(q)->manifold_id() != numbers::flat_manifold_id)
             cell_is_flat = false;

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.