]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Triangulation: Use lines_per_face for indexing.
authorDavid Wells <drwells@email.unc.edu>
Sat, 21 Jan 2023 13:38:41 +0000 (08:38 -0500)
committerDavid Wells <drwells@email.unc.edu>
Sun, 22 Jan 2023 20:19:45 +0000 (15:19 -0500)
It's more descriptive as this array is only used in 3D.

include/deal.II/grid/tria_accessor.templates.h
source/grid/tria.cc

index f27a9ef59253ff7170903079b3e36e4d05bc3419..e438be2d2493f401e3361106820bed471591f354 100644 (file)
@@ -959,13 +959,13 @@ namespace internal
       {
         Assert(accessor.used(), TriaAccessorExceptions::ExcCellNotUsed());
         AssertIndexRange(line, accessor.n_lines());
-        Assert(accessor.present_index * GeometryInfo<2>::lines_per_cell + line <
+        Assert(accessor.present_index * GeometryInfo<3>::lines_per_face + line <
                  accessor.tria->faces->quads_line_orientations.size(),
                ExcInternalError());
 
         // quads as part of 3d hexes can have non-standard orientation
         accessor.tria->faces->quads_line_orientations
-          [accessor.present_index * GeometryInfo<2>::lines_per_cell + line] =
+          [accessor.present_index * GeometryInfo<3>::lines_per_face + line] =
           value;
       }
 
index 2b5ee8ac438f44363e0cbed40fca631390031a12..e466b78451c66044af772e0dc1b611bd81dbcb78 100644 (file)
@@ -1122,7 +1122,7 @@ namespace internal
         {
           // reserve the field of the derived class
           tria_faces.quads_line_orientations.resize(
-            new_size * GeometryInfo<2>::lines_per_cell, true);
+            new_size * GeometryInfo<3>::lines_per_face, true);
 
           auto &q_is_q = tria_faces.quad_is_quadrilateral;
           q_is_q.reserve(new_size);
@@ -2345,7 +2345,7 @@ namespace internal
                      ++i, ++j, ++k)
                   {
                     // set line index
-                    quads_0.cells[q * GeometryInfo<2>::faces_per_cell + j] =
+                    quads_0.cells[q * GeometryInfo<3>::lines_per_face + j] =
                       crs.col[i];
 
                     // set line orientations
@@ -2357,7 +2357,7 @@ namespace internal
                     Assert(raw_orientation == 0u || raw_orientation == 1u,
                            ExcInternalError());
                     faces.quads_line_orientations
-                      [q * GeometryInfo<2>::faces_per_cell + j] =
+                      [q * GeometryInfo<3>::lines_per_face + j] =
                       raw_orientation == 1u;
                   }
               }
@@ -2623,7 +2623,7 @@ namespace internal
       {
         const unsigned int dim = faces.dim;
 
-        const unsigned int max_faces_per_cell = 2 * structdim;
+        const unsigned int max_lines_per_face = 2 * structdim;
 
         if (dim == 3 && structdim == 2)
           {
@@ -2631,7 +2631,7 @@ namespace internal
             faces.quad_is_quadrilateral.assign(size, true);
 
             // quad line orientations
-            faces.quads_line_orientations.assign(size * max_faces_per_cell,
+            faces.quads_line_orientations.assign(size * max_lines_per_face,
                                                  true);
           }
       }

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.