From c8d6fef86eb41349f6efc82cda3e149723f10e60 Mon Sep 17 00:00:00 2001
From: podlesny <podlesny@zedat.fu-berlin.de>
Date: Mon, 15 Feb 2021 10:00:14 +0100
Subject: [PATCH] host grid getter

---
 dune/tectonic/data-structures/body/body.cc | 6 ++++++
 dune/tectonic/data-structures/body/body.hh | 1 +
 2 files changed, 7 insertions(+)

diff --git a/dune/tectonic/data-structures/body/body.cc b/dune/tectonic/data-structures/body/body.cc
index 83fb4fa8..191cf4d6 100644
--- a/dune/tectonic/data-structures/body/body.cc
+++ b/dune/tectonic/data-structures/body/body.cc
@@ -94,6 +94,12 @@ auto LeafBody<GridTEMPLATE, VectorType>::grid() const
     return grid_;
 }
 
+template <class GridTEMPLATE, class VectorType>
+auto LeafBody<GridTEMPLATE, VectorType>::hostGrid() const
+-> std::shared_ptr<GridTEMPLATE> {
+
+    return hostGrid_;
+}
 
 template <class GridTEMPLATE, class VectorType>
 auto LeafBody<GridTEMPLATE, VectorType>::gridView() const
diff --git a/dune/tectonic/data-structures/body/body.hh b/dune/tectonic/data-structures/body/body.hh
index 74809e50..7f698435 100644
--- a/dune/tectonic/data-structures/body/body.hh
+++ b/dune/tectonic/data-structures/body/body.hh
@@ -90,6 +90,7 @@ class LeafBody {
     void setDeformation(const VectorType& def);
     auto deformation() const -> DeformationFunction&;
     auto grid() const -> std::shared_ptr<GridType>;
+    auto hostGrid() const -> std::shared_ptr<HostGridType>;
 
     auto gridView() const -> const GridView&;
     auto nVertices() const -> size_t;
-- 
GitLab