From: Wolfgang Bangerth Date: Thu, 10 Oct 2024 13:53:41 +0000 (-0600) Subject: Implement the most important missing cases. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5634a37a9968934e6fb70204ba7a872c1ab7d74;p=dealii.git Implement the most important missing cases. --- diff --git a/source/fe/fe.cc b/source/fe/fe.cc index 0998b8801c..1f5e56c680 100644 --- a/source/fe/fe.cc +++ b/source/fe/fe.cc @@ -887,21 +887,39 @@ FiniteElement::interface_constraints_size() const { case 1: return {0U, 0U}; + case 2: // We have to interpolate from the DoFs in the interior of the // the two child faces (=lines) and the one central vertex // to the DoFs of the parent face: return {this->n_dofs_per_vertex() + 2 * this->n_dofs_per_line(), this->n_dofs_per_face(face_no)}; + case 3: // 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: - Assert(this->reference_cell() == ReferenceCells::get_hypercube(), - ExcNotImplemented()); - return {5 * this->n_dofs_per_vertex() + 12 * this->n_dofs_per_line() + - 4 * this->n_dofs_per_quad(face_no), - this->n_dofs_per_face(face_no)}; + if (this->reference_cell() == ReferenceCells::Hexahedron) + return { + 5 * this->n_dofs_per_vertex() + // 4 vertices at mid-edge points + // + 1 at cell center + 12 * this->n_dofs_per_line() + // 4*2 children of the old edges + // + 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) + 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 + // + 3 edges in the cell interior + 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}; + } + default: DEAL_II_NOT_IMPLEMENTED(); }