From 4a6bf81ae6db866b6146da6723ec87af564a417f Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 5 Nov 2016 21:35:26 -0600 Subject: [PATCH] Use 'order' instead of 'degree' in FE_RannacherTurek. The existing 'degree' member variable shadows a member of the base class, but worse it does not have the same semantics: the former pertains to the order of the element, the latter to the polynomial degree. Fix this. --- include/deal.II/fe/fe_rannacher_turek.h | 14 ++++++++------ source/fe/fe_rannacher_turek.cc | 10 +++++----- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/deal.II/fe/fe_rannacher_turek.h b/include/deal.II/fe/fe_rannacher_turek.h index 17dbd0f9c9..27c6370c25 100644 --- a/include/deal.II/fe/fe_rannacher_turek.h +++ b/include/deal.II/fe/fe_rannacher_turek.h @@ -55,13 +55,13 @@ class FE_RannacherTurek : public FE_Poly, dim> { public: /** - * Constructor for Rannacher-Turek element of degree @p degree, using @p + * Constructor for Rannacher-Turek element of given @p order, using @p * n_face_support_points quadrature points on each face for interpolation. - * Notice that the element of degree 0 contains polynomials of degree 2. + * Notice that the element of order 0 contains polynomials of degree 2. * - * Only implemented for degree 0 in 2D. + * The element is currently only implemented for order 0 in 2D. */ - FE_RannacherTurek(const unsigned int degree = 0, + FE_RannacherTurek(const unsigned int order = 0, const unsigned int n_face_support_points = 2); virtual std::string get_name() const; @@ -79,14 +79,16 @@ public: const VectorSlice > > &values) const; private: /** - * Degree of this element. + * Order of this element. */ - const unsigned int degree; + const unsigned int order; + /** * The number of quadrature points used on each face to evaluate node * functionals during interpolation. */ const unsigned int n_face_support_points; + /** * The weights used on the faces to evaluate node functionals. */ diff --git a/source/fe/fe_rannacher_turek.cc b/source/fe/fe_rannacher_turek.cc index 17802be592..9b5dbdaa48 100644 --- a/source/fe/fe_rannacher_turek.cc +++ b/source/fe/fe_rannacher_turek.cc @@ -26,7 +26,7 @@ DEAL_II_NAMESPACE_OPEN template -FE_RannacherTurek::FE_RannacherTurek(const unsigned int degree, +FE_RannacherTurek::FE_RannacherTurek(const unsigned int order, const unsigned int n_face_support_points) : FE_Poly, dim>( PolynomialsRannacherTurek(), @@ -36,11 +36,11 @@ FE_RannacherTurek::FE_RannacherTurek(const unsigned int degree, FiniteElementData::L2), std::vector(4, false), // restriction not implemented std::vector(4, std::vector(1, true))), - degree(degree), + order(order), n_face_support_points(n_face_support_points) { Assert(dim == 2, ExcNotImplemented()); - Assert(degree == 0, ExcNotImplemented()); + Assert(order == 0, ExcNotImplemented()); this->initialize_support_points(); } @@ -63,7 +63,7 @@ std::string FE_RannacherTurek::get_name() const std::ostringstream namebuf; namebuf << "FE_RannacherTurek" << "<" << dim << ">" - << "(" << this->degree << ", " << this->n_face_support_points << ")"; + << "(" << this->order << ", " << this->n_face_support_points << ")"; return namebuf.str(); } @@ -72,7 +72,7 @@ std::string FE_RannacherTurek::get_name() const template FiniteElement *FE_RannacherTurek::clone() const { - return new FE_RannacherTurek(this->degree, this->n_face_support_points); + return new FE_RannacherTurek(this->order, this->n_face_support_points); } -- 2.39.5