]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Clean up some orientation code.
authorDavid Wells <drwells@email.unc.edu>
Mon, 6 Feb 2023 00:04:09 +0000 (19:04 -0500)
committerDavid Wells <drwells@email.unc.edu>
Sun, 2 Jul 2023 01:40:57 +0000 (21:40 -0400)
source/base/qprojector.cc

index 4edf92966281ce2b2d49623be676d5ee27b0b56c..8d3a1261bd3f019e7f6d8d5359098f37dc81c6e0 100644 (file)
@@ -1330,10 +1330,13 @@ QProjector<dim>::DataSetDescriptor::face(const ReferenceCell &reference_cell,
                 n_quadrature_points};
       else if (dim == 3)
         {
-          const unsigned int orientation = (face_flip ? 4 : 0) +
-                                           (face_rotation ? 2 : 0) +
-                                           (face_orientation ? 1 : 0);
-          return {(6 * face_no + orientation) * n_quadrature_points};
+          const unsigned char orientation = (face_flip ? 4 : 0) +
+                                            (face_rotation ? 2 : 0) +
+                                            (face_orientation ? 1 : 0);
+          Assert(orientation < 6, ExcInternalError());
+          return {(reference_cell.n_face_orientations(face_no) * face_no +
+                   orientation) *
+                  n_quadrature_points};
         }
     }
 

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.