]> https://gitweb.dealii.org/ - dealii.git/commitdiff
FEFaceValues: use face_no to select quadrature rule 11406/head
authorPeter Munch <peterrmuench@gmail.com>
Sun, 20 Dec 2020 15:30:20 +0000 (16:30 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 20 Dec 2020 15:30:20 +0000 (16:30 +0100)
include/deal.II/fe/fe_values.h
source/fe/fe_values.cc

index 4367b58c5a97cefbf6dd2c54fb747e270b36bb95..8b5a704d9a91c6e2f66907c06da287c80b74bbb8 100644 (file)
@@ -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 <int dim, int spacedim>
 inline const Quadrature<dim - 1> &
 FEFaceValuesBase<dim, spacedim>::get_quadrature() const
 {
-  return quadrature[0];
+  return quadrature[quadrature.size() == 1 ? 0 : present_face_no];
 }
 
 
index 4d4edceee7098a02be9370c85ad72e7d45aebf30..95b6521ff4052a1411f8995cfd4a7e8423eedcfd 100644 (file)
@@ -4861,6 +4861,8 @@ template <int dim, int spacedim>
 void
 FEFaceValues<dim, spacedim>::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<dim, spacedim>::cell_iterator cell =
     *this->present_cell;
@@ -5122,6 +5124,8 @@ void
 FESubfaceValues<dim, spacedim>::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<dim, spacedim>::cell_iterator cell =
     *this->present_cell;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.