From 8c4f4d0a0675c9b5c8d6d7c08d50d0a829951c7c Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 10 Oct 2024 08:00:54 -0600 Subject: [PATCH] Make the implementation more generic. --- source/fe/fe.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/fe/fe.cc b/source/fe/fe.cc index 1f5e56c680..3c788186c5 100644 --- a/source/fe/fe.cc +++ b/source/fe/fe.cc @@ -899,7 +899,8 @@ FiniteElement::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::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::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(); -- 2.39.5