From ecd213cfb7d4d9e567941565c951c0d2b8d7ccae Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Sun, 20 Dec 2020 16:30:20 +0100 Subject: [PATCH] FEFaceValues: use face_no to select quadrature rule --- include/deal.II/fe/fe_values.h | 8 +++++++- source/fe/fe_values.cc | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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; -- 2.39.5