]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Allow read access to data in Interpolated*Function 11388/head
authorTimo Heister <timo.heister@gmail.com>
Thu, 17 Dec 2020 16:25:13 +0000 (11:25 -0500)
committerTimo Heister <timo.heister@gmail.com>
Tue, 22 Dec 2020 00:29:20 +0000 (19:29 -0500)
include/deal.II/base/function_lib.h
source/base/function_lib.cc

index e4b9a83c60e125facf64be185efef535a099ccb4..d6f48579e191fca57726313c3971206c543bf4ca 100644 (file)
@@ -1441,6 +1441,12 @@ namespace Functions
     virtual std::size_t
     memory_consumption() const override;
 
+    /**
+     * Return a reference to the internally stored data.
+     */
+    const Table<dim, double> &
+    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<dim, double> &
+    get_data() const;
+
   private:
     /**
      * The set of interval endpoints in each of the coordinate directions.
index 6f25f9df574c21a8d2c53be07cd445bebcc44fa3..4df376fc24773fa547dd0e65be2b8451096d4749 100644 (file)
@@ -2551,6 +2551,15 @@ namespace Functions
 
 
 
+  template <int dim>
+  const Table<dim, double> &
+  InterpolatedTensorProductGridData<dim>::get_data() const
+  {
+    return data_values;
+  }
+
+
+
   template <int dim>
   double
   InterpolatedTensorProductGridData<dim>::value(
@@ -2745,6 +2754,15 @@ namespace Functions
 
 
 
+  template <int dim>
+  const Table<dim, double> &
+  InterpolatedUniformGridData<dim>::get_data() const
+  {
+    return data_values;
+  }
+
+
+
   /* ---------------------- Polynomial ----------------------- */
 
 

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.