From aa1f909c02d9476291d53f2faefbba28d9470ce3 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 21 May 2020 12:19:07 -0400 Subject: [PATCH] Fix PolynomialsP --- include/deal.II/base/polynomials_p.h | 11 +++++++++-- include/deal.II/base/scalar_polynomials_base.h | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/include/deal.II/base/polynomials_p.h b/include/deal.II/base/polynomials_p.h index cc445d5791..5f2dc4b488 100644 --- a/include/deal.II/base/polynomials_p.h +++ b/include/deal.II/base/polynomials_p.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -66,8 +67,8 @@ public: * Note, that this number is PolynomialSpace::degree()-1, compare * definition in PolynomialSpace. */ - unsigned int - degree() const; + virtual unsigned int + degree() const override; /** * For the nth polynomial $p_n(x,y,z)=x^i y^j z^k$ this function @@ -78,6 +79,12 @@ public: std::array directional_degrees(unsigned int n) const; + std::unique_ptr> + clone() const override + { + return std_cxx14::make_unique>(*this); + } + private: /** * Fills the index_map. diff --git a/include/deal.II/base/scalar_polynomials_base.h b/include/deal.II/base/scalar_polynomials_base.h index c039e4b7cb..10a123ef1b 100644 --- a/include/deal.II/base/scalar_polynomials_base.h +++ b/include/deal.II/base/scalar_polynomials_base.h @@ -193,7 +193,7 @@ public: * class. A derived class may override this if its value is different from * @p my_degree. */ - unsigned int + virtual unsigned int degree() const; /** -- 2.39.5