From: Timo Heister Date: Thu, 17 Dec 2020 16:25:13 +0000 (-0500) Subject: Allow read access to data in Interpolated*Function X-Git-Tag: v9.3.0-rc1~675^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11388%2Fhead;p=dealii.git Allow read access to data in Interpolated*Function --- diff --git a/include/deal.II/base/function_lib.h b/include/deal.II/base/function_lib.h index e4b9a83c60..d6f48579e1 100644 --- a/include/deal.II/base/function_lib.h +++ b/include/deal.II/base/function_lib.h @@ -1441,6 +1441,12 @@ namespace Functions virtual std::size_t memory_consumption() const override; + /** + * Return a reference to the internally stored data. + */ + const Table & + get_data() const; + protected: /** * Find the index in the table of the rectangle containing an input point @@ -1552,6 +1558,12 @@ namespace Functions virtual std::size_t memory_consumption() const override; + /** + * Return a reference to the internally stored data. + */ + const Table & + get_data() const; + private: /** * The set of interval endpoints in each of the coordinate directions. diff --git a/source/base/function_lib.cc b/source/base/function_lib.cc index 6f25f9df57..4df376fc24 100644 --- a/source/base/function_lib.cc +++ b/source/base/function_lib.cc @@ -2551,6 +2551,15 @@ namespace Functions + template + const Table & + InterpolatedTensorProductGridData::get_data() const + { + return data_values; + } + + + template double InterpolatedTensorProductGridData::value( @@ -2745,6 +2754,15 @@ namespace Functions + template + const Table & + InterpolatedUniformGridData::get_data() const + { + return data_values; + } + + + /* ---------------------- Polynomial ----------------------- */