]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make the implementation more generic. 17760/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 10 Oct 2024 14:00:54 +0000 (08:00 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 11 Oct 2024 03:28:55 +0000 (21:28 -0600)
source/fe/fe.cc

index 1f5e56c6801ba95638b66b7371fea7aab0227126..3c788186c5566f2f281a353582ad00eeccc59412 100644 (file)
@@ -899,7 +899,8 @@ FiniteElement<dim, spacedim>::interface_constraints_size() const
         // We have to interpolate from the DoFs in the interior of the
         // the child faces (=quads or tris) and the vertices that are
         // not part of the parent face, to the DoFs of the parent face:
-        if (this->reference_cell() == ReferenceCells::Hexahedron)
+        if (this->reference_cell().face_reference_cell(face_no) ==
+            ReferenceCells::Quadrilateral)
           return {
             5 * this->n_dofs_per_vertex() +  // 4 vertices at mid-edge points
                                              // + 1 at cell center
@@ -907,7 +908,8 @@ FiniteElement<dim, spacedim>::interface_constraints_size() const
                                              // + 2*2 edges in the cell interior
               4 * this->n_dofs_per_quad(face_no), // 4 child faces
             this->n_dofs_per_face(face_no)};
-        else if (this->reference_cell() == ReferenceCells::Tetrahedron)
+        else if (this->reference_cell().face_reference_cell(face_no) ==
+                 ReferenceCells::Triangle)
           return {
             3 * this->n_dofs_per_vertex() + // 3 vertices at mid-edge points
               9 * this->n_dofs_per_line() + // 3*2 children of the old edges
@@ -915,10 +917,7 @@ FiniteElement<dim, spacedim>::interface_constraints_size() const
               4 * this->n_dofs_per_quad(face_no), // 4 child faces
             this->n_dofs_per_face(face_no)};
         else
-          {
-            Assert(this->n_dofs_per_face(face_no) == 0, ExcNotImplemented());
-            return {0U, 0U};
-          }
+          DEAL_II_ASSERT_UNREACHABLE();
 
       default:
         DEAL_II_NOT_IMPLEMENTED();

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.