]> https://gitweb.dealii.org/ - dealii.git/commitdiff
ReferenceCell: permit face index calculations for lines.
authorDavid Wells <drwells@email.unc.edu>
Mon, 25 Mar 2024 16:25:35 +0000 (12:25 -0400)
committerDavid Wells <drwells@email.unc.edu>
Fri, 29 Mar 2024 02:26:37 +0000 (22:26 -0400)
This way we can call standard_to_real_face_vertex for all supported topological
dimensions.

include/deal.II/grid/reference_cell.h

index 19b760fa1b1daec15afaf211bd6218ed885cc09f..803a5a00fb9172c6219b4d5f5f84e68e7d2cc5a0 100644 (file)
@@ -1877,7 +1877,7 @@ ReferenceCell::face_to_cell_vertices(
   if (get_dimension() == 1)
     Assert(combined_face_orientation ==
              ReferenceCell::default_combined_face_orientation(),
-           ExcMessage("In 1D, all cells must have the default orientation."));
+           ExcMessage("In 1D, all faces must have the default orientation."));
   else
     AssertIndexRange(combined_face_orientation, n_face_orientations(face));
 
@@ -1988,9 +1988,13 @@ ReferenceCell::standard_to_real_face_vertex(
   switch (this->kind)
     {
       case ReferenceCells::Vertex:
-      case ReferenceCells::Line:
         DEAL_II_NOT_IMPLEMENTED();
         break;
+      case ReferenceCells::Line:
+        Assert(face_orientation == default_combined_face_orientation(),
+               ExcMessage(
+                 "In 1D, all faces must have the default orientation."));
+        return vertex;
       case ReferenceCells::Triangle:
       case ReferenceCells::Quadrilateral:
         return line_vertex_permutations[face_orientation][vertex];

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.