* @author Timo Heister, 2012
*/
template <int dim>
-class TensorProductPolynomialsConst
+class TensorProductPolynomialsConst : public ScalarPolynomialsBase<dim>
{
public:
/**
unsigned int
n() const;
+ /**
+ * Return the name of the space, which is
+ * <tt>TensorProductPolynomialsConst</tt>.
+ */
+ std::string
+ name() const override;
+
+ /**
+ * @copydoc ScalarPolynomialsBase<dim>::clone()
+ */
+ virtual std::unique_ptr<ScalarPolynomialsBase<dim>>
+ clone() const override;
+
private:
/**
* The TensorProductPolynomials object
template <class Pol>
inline TensorProductPolynomialsConst<dim>::TensorProductPolynomialsConst(
const std::vector<Pol> &pols)
- : tensor_polys(pols)
+ : ScalarPolynomialsBase<dim>(1, Utilities::fixed_power<dim>(pols.size()) + 1)
+ , tensor_polys(pols)
, index_map(tensor_polys.n() + 1)
, index_map_inverse(tensor_polys.n() + 1)
{}
#include <deal.II/base/exceptions.h>
+#include <deal.II/base/std_cxx14/memory.h>
#include <deal.II/base/tensor_product_polynomials_const.h>
DEAL_II_NAMESPACE_OPEN
}
+
+template <int dim>
+std::unique_ptr<ScalarPolynomialsBase<dim>>
+TensorProductPolynomialsConst<dim>::clone() const
+{
+ return std_cxx14::make_unique<TensorProductPolynomialsConst<dim>>(*this);
+}
+
+
/* ------------------- explicit instantiations -------------- */
template class TensorProductPolynomialsConst<1>;
template class TensorProductPolynomialsConst<2>;