From d2abc8f04615400b03ceb67f4716f4d2a921b4d0 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Sat, 15 May 2021 10:18:34 +0200 Subject: [PATCH] Let TensorProductPolynomials return 1D polynomial space --- include/deal.II/base/tensor_product_polynomials.h | 13 ++++++++++--- source/base/tensor_product_polynomials.cc | 10 ++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/include/deal.II/base/tensor_product_polynomials.h b/include/deal.II/base/tensor_product_polynomials.h index da0ce0e73a..a8666cc80f 100644 --- a/include/deal.II/base/tensor_product_polynomials.h +++ b/include/deal.II/base/tensor_product_polynomials.h @@ -84,9 +84,9 @@ public: /** * Constructor. pols is a vector of objects that should be derived - * or otherwise convertible to one-dimensional polynomial objects of type @p - * PolynomialType (template argument of class). It will be copied element by - * element into a private variable. + * or otherwise convertible to one-dimensional polynomial objects of type + * `PolynomialType` (template argument of class). It will be copied element + * by element into a protected member variable. */ template TensorProductPolynomials(const std::vector &pols); @@ -245,6 +245,13 @@ public: virtual std::size_t memory_consumption() const override; + /** + * Return a copy of the underlying one-dimensional polynomials given to the + * constructor of this class. + */ + std::vector + get_underlying_polynomials() const; + protected: /** * Copy of the vector pols of polynomials given to the constructor. diff --git a/source/base/tensor_product_polynomials.cc b/source/base/tensor_product_polynomials.cc index da6ecac666..8bb03217cf 100644 --- a/source/base/tensor_product_polynomials.cc +++ b/source/base/tensor_product_polynomials.cc @@ -504,6 +504,16 @@ TensorProductPolynomials::memory_consumption() const +template +std::vector +TensorProductPolynomials::get_underlying_polynomials() + const +{ + return polynomials; +} + + + /* ------------------- AnisotropicPolynomials -------------- */ -- 2.39.5