From 353c92687765b8ac4a0c0f067ce51a05a1f02802 Mon Sep 17 00:00:00 2001
From: Christoph Lehmann <christoph.lehmann@ufz.de>
Date: Tue, 5 Jul 2016 13:51:18 +0200
Subject: [PATCH] [PL] expose DOF table

---
 ProcessLib/ExtrapolatorData.h | 16 +++++++++++-----
 ProcessLib/Process.h          |  9 +++++++--
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/ProcessLib/ExtrapolatorData.h b/ProcessLib/ExtrapolatorData.h
index bab990e1fdf..1c7c3ffc866 100644
--- a/ProcessLib/ExtrapolatorData.h
+++ b/ProcessLib/ExtrapolatorData.h
@@ -28,17 +28,17 @@ struct ExtrapolatorData
     ExtrapolatorData() = default;
 
     ExtrapolatorData(
-        std::unique_ptr<NumLib::Extrapolator>&& extrapolator_,
+        std::unique_ptr<NumLib::Extrapolator>&& extrapolator,
         NumLib::LocalToGlobalIndexMap const* const dof_table_single_component,
         bool const manage_storage)
-        : extrapolator(std::move(extrapolator_))
+        : _extrapolator(std::move(extrapolator))
         , _dof_table_single_component(dof_table_single_component)
         , _manage_storage(manage_storage)
     {
     }
 
     ExtrapolatorData(ExtrapolatorData&& other)
-        : extrapolator(std::move(other.extrapolator))
+        : _extrapolator(std::move(other._extrapolator))
         , _dof_table_single_component(other._dof_table_single_component)
         , _manage_storage(other._manage_storage)
     {
@@ -51,12 +51,17 @@ struct ExtrapolatorData
         cleanup();
         _manage_storage = other._manage_storage;
         _dof_table_single_component = other._dof_table_single_component;
-        extrapolator = std::move(other.extrapolator);
+        _extrapolator = std::move(other._extrapolator);
         return *this;
     }
 
+    NumLib::LocalToGlobalIndexMap const& getDOFTable() const
+    {
+        return *_dof_table_single_component;
+    }
+    NumLib::Extrapolator& getExtrapolator() const { return *_extrapolator; }
+
     ~ExtrapolatorData() { cleanup(); }
-    std::unique_ptr<NumLib::Extrapolator> extrapolator;
 
 private:
     void cleanup()
@@ -66,6 +71,7 @@ private:
         }
     }
 
+    std::unique_ptr<NumLib::Extrapolator> _extrapolator;
     NumLib::LocalToGlobalIndexMap const* _dof_table_single_component = nullptr;
     bool _manage_storage = false;
 };
diff --git a/ProcessLib/Process.h b/ProcessLib/Process.h
index bb9da6ed701..ccedc3ae2df 100644
--- a/ProcessLib/Process.h
+++ b/ProcessLib/Process.h
@@ -87,9 +87,14 @@ public:
     }
 
 protected:
-    NumLib::Extrapolator& getExtrapolator()
+    NumLib::Extrapolator& getExtrapolator() const
     {
-        return *_extrapolator_data.extrapolator;
+        return _extrapolator_data.getExtrapolator();
+    }
+
+    NumLib::LocalToGlobalIndexMap const& getSingleComponentDOFTable() const
+    {
+        return _extrapolator_data.getDOFTable();
     }
 
 private:
-- 
GitLab