From: Peter Munch Date: Fri, 27 May 2022 20:37:31 +0000 (+0200) Subject: FESystem::build_interface_constraints() for wedges/pyramids X-Git-Tag: v9.5.0-rc1~1154^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13842%2Fhead;p=dealii.git FESystem::build_interface_constraints() for wedges/pyramids --- diff --git a/source/fe/fe.cc b/source/fe/fe.cc index a31744c878..857c3fac99 100644 --- a/source/fe/fe.cc +++ b/source/fe/fe.cc @@ -840,14 +840,15 @@ bool FiniteElement::constraints_are_implemented( const internal::SubfaceCase &subface_case) const { - // TODO: the implementation makes the assumption that all faces have the - // same number of dofs - AssertDimension(this->n_unique_faces(), 1); - const unsigned int face_no = 0; - if (subface_case == internal::SubfaceCase::case_isotropic) - return (this->n_dofs_per_face(face_no) == 0) || - (interface_constraints.m() != 0); + { + unsigned int n_dofs_on_faces = 0; + + for (const auto face_no : this->reference_cell().face_indices()) + n_dofs_on_faces += this->n_dofs_per_face(face_no); + + return (n_dofs_on_faces == 0) || (interface_constraints.m() != 0); + } else return false; } diff --git a/source/fe/fe_system.cc b/source/fe/fe_system.cc index 2975be1af8..2e7f0fd5e5 100644 --- a/source/fe/fe_system.cc +++ b/source/fe/fe_system.cc @@ -1534,13 +1534,6 @@ template void FESystem::build_interface_constraints() { - // TODO: the implementation makes the assumption that all faces have the - // same number of dofs - if (this->n_unique_faces() != 1) - return; - - const unsigned int face_no = 0; - // check whether all base elements implement their interface constraint // matrices. if this is not the case, then leave the interface costraints of // this composed element empty as well; however, the rest of the element is @@ -1549,6 +1542,11 @@ FESystem::build_interface_constraints() if (base_element(base).constraints_are_implemented() == false) return; + // TODO: the implementation makes the assumption that all faces have the + // same number of dofs + AssertDimension(this->n_unique_faces(), 1); + const unsigned int face_no = 0; + this->interface_constraints.TableBase<2, double>::reinit( this->interface_constraints_size());