From: Peter Munch Date: Sun, 20 Dec 2020 15:30:20 +0000 (+0100) Subject: FEFaceValues: use face_no to select quadrature rule X-Git-Tag: v9.3.0-rc1~728^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11406%2Fhead;p=dealii.git FEFaceValues: use face_no to select quadrature rule --- diff --git a/include/deal.II/fe/fe_values.h b/include/deal.II/fe/fe_values.h index 4367b58c5a..8b5a704d9a 100644 --- a/include/deal.II/fe/fe_values.h +++ b/include/deal.II/fe/fe_values.h @@ -3962,6 +3962,12 @@ public: memory_consumption() const; protected: + /** + * Number of the face selected the last time the reinit() function was + * called. + */ + unsigned int present_face_no; + /** * Index of the face selected the last time the reinit() function was * called. @@ -5901,7 +5907,7 @@ template inline const Quadrature & FEFaceValuesBase::get_quadrature() const { - return quadrature[0]; + return quadrature[quadrature.size() == 1 ? 0 : present_face_no]; } diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index 4d4edceee7..95b6521ff4 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -4861,6 +4861,8 @@ template void FEFaceValues::do_reinit(const unsigned int face_no) { + this->present_face_no = face_no; + // first of all, set the present_face_index (if available) const typename Triangulation::cell_iterator cell = *this->present_cell; @@ -5122,6 +5124,8 @@ void FESubfaceValues::do_reinit(const unsigned int face_no, const unsigned int subface_no) { + this->present_face_no = face_no; + // first of all, set the present_face_index (if available) const typename Triangulation::cell_iterator cell = *this->present_cell;