]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix PolynomialsP
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 21 May 2020 16:19:07 +0000 (12:19 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 21 May 2020 16:19:07 +0000 (12:19 -0400)
include/deal.II/base/polynomials_p.h
include/deal.II/base/scalar_polynomials_base.h

index cc445d5791faf9ffb3291ef7db573c853bbb2a05..5f2dc4b488161caf6d848292122d0b6388822f2f 100644 (file)
@@ -23,6 +23,7 @@
 #include <deal.II/base/point.h>
 #include <deal.II/base/polynomial.h>
 #include <deal.II/base/polynomial_space.h>
+#include <deal.II/base/std_cxx14/memory.h>
 #include <deal.II/base/tensor.h>
 
 #include <vector>
@@ -66,8 +67,8 @@ public:
    * Note, that this number is <tt>PolynomialSpace::degree()-1</tt>, compare
    * definition in PolynomialSpace.
    */
-  unsigned int
-  degree() const;
+  virtual unsigned int
+  degree() const override;
 
   /**
    * For the <tt>n</tt>th polynomial $p_n(x,y,z)=x^i y^j z^k$ this function
@@ -78,6 +79,12 @@ public:
   std::array<unsigned int, dim>
   directional_degrees(unsigned int n) const;
 
+  std::unique_ptr<ScalarPolynomialsBase<dim>>
+  clone() const override
+  {
+    return std_cxx14::make_unique<PolynomialsP<dim>>(*this);
+  }
+
 private:
   /**
    * Fills the <tt>index_map</tt>.
index c039e4b7cb426f7b838793ced69a3a3d04fe5b74..10a123ef1b60d5efa2788931b2359d439910cad1 100644 (file)
@@ -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;
 
   /**

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.