From: Peter Munch Date: Mon, 14 Dec 2020 12:01:50 +0000 (+0100) Subject: FEInterfaceValues: pass to the constructor hp::QCollection X-Git-Tag: v9.3.0-rc1~696^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adef3544873ea59c87a99792b9aeb3c75bb1e2be;p=dealii.git FEInterfaceValues: pass to the constructor hp::QCollection --- diff --git a/include/deal.II/fe/fe_interface_values.h b/include/deal.II/fe/fe_interface_values.h index 3d1a2b8c98..0b581f237d 100644 --- a/include/deal.II/fe/fe_interface_values.h +++ b/include/deal.II/fe/fe_interface_values.h @@ -21,6 +21,8 @@ #include #include +#include + DEAL_II_NAMESPACE_OPEN /** @@ -67,6 +69,16 @@ public: const Quadrature & quadrature, const UpdateFlags update_flags); + /** + * The same as above but taking a collection of quadrature rules + * so that different quadrature rules can be assigned to different + * faces. + */ + FEInterfaceValues(const Mapping & mapping, + const FiniteElement &fe, + const hp::QCollection & quadrature, + const UpdateFlags update_flags); + /** * Construct the FEInterfaceValues with a single FiniteElement and * a Q1 Mapping. @@ -487,6 +499,24 @@ FEInterfaceValues::FEInterfaceValues( , fe_face_values_neighbor(nullptr) {} +template +FEInterfaceValues::FEInterfaceValues( + const Mapping & mapping, + const FiniteElement &fe, + const hp::QCollection & quadrature, + const UpdateFlags update_flags) + : n_quadrature_points(quadrature.max_n_quadrature_points()) + , internal_fe_face_values(mapping, fe, quadrature, update_flags) + , internal_fe_subface_values(mapping, fe, quadrature, update_flags) + , internal_fe_face_values_neighbor(mapping, fe, quadrature[0], update_flags) + , internal_fe_subface_values_neighbor(mapping, + fe, + quadrature[0], + update_flags) + , fe_face_values(nullptr) + , fe_face_values_neighbor(nullptr) +{} + template @@ -551,6 +581,12 @@ FEInterfaceValues::reinit( fe_face_values_neighbor = &internal_fe_subface_values_neighbor; } + AssertDimension(fe_face_values->n_quadrature_points, + fe_face_values_neighbor->n_quadrature_points); + + const_cast(this->n_quadrature_points) = + fe_face_values->n_quadrature_points; + // Set up dof mapping and remove duplicates (for continuous elements). { // Get dof indices first: