From: Wolfgang Bangerth Date: Thu, 5 Dec 2019 20:05:15 +0000 (-0700) Subject: Add to FEInterfaceValues what we already have in FEValues. X-Git-Tag: v9.2.0-rc1~789^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9144%2Fhead;p=dealii.git Add to FEInterfaceValues what we already have in FEValues. --- diff --git a/include/deal.II/fe/fe_interface_values.h b/include/deal.II/fe/fe_interface_values.h index 6a7cbd524b..f7a7b31225 100644 --- a/include/deal.II/fe/fe_interface_values.h +++ b/include/deal.II/fe/fe_interface_values.h @@ -51,6 +51,12 @@ template class FEInterfaceValues { public: + /** + * Number of quadrature points. + */ + const unsigned int n_quadrature_points; + + /** * Construct the FEInterfaceValues with a single FiniteElement (same on both * sides of the facet). The FEFaceValues objects will be initialized with @@ -162,6 +168,20 @@ public: bool at_boundary() const; + /** + * Mapped quadrature weight. This value equals the + * mapped surface element times the weight of the quadrature + * point. + * + * You can think of the quantity returned by this function as the + * surface element $ds$ in the integral that we implement here by + * quadrature. + * + * @dealiiRequiresUpdateFlags{update_JxW_values} + */ + double + JxW(const unsigned int quadrature_point) const; + /** * Return the vector of JxW values for each quadrature point. * @@ -412,7 +432,8 @@ FEInterfaceValues::FEInterfaceValues( const FiniteElement &fe, const Quadrature & quadrature, const UpdateFlags update_flags) - : internal_fe_face_values(mapping, fe, quadrature, update_flags) + : n_quadrature_points(quadrature.size()) + , 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, update_flags) , internal_fe_subface_values_neighbor(mapping, fe, quadrature, update_flags) @@ -427,7 +448,8 @@ FEInterfaceValues::FEInterfaceValues( const FiniteElement &fe, const Quadrature & quadrature, const UpdateFlags update_flags) - : internal_fe_face_values(StaticMappingQ1::mapping, + : n_quadrature_points(quadrature.size()) + , internal_fe_face_values(StaticMappingQ1::mapping, fe, quadrature, update_flags) @@ -553,6 +575,17 @@ FEInterfaceValues::reinit(const CellIteratorType &cell, +template +inline double +FEInterfaceValues::JxW(const unsigned int q) const +{ + Assert(fe_face_values != nullptr, + ExcMessage("This call requires a call to reinit() first.")); + return fe_face_values->JxW(q); +} + + + template const std::vector & FEInterfaceValues::get_JxW_values() const