From 04d598a20e7d3139394148d4995188264b64aac1 Mon Sep 17 00:00:00 2001
From: Jonathan Youett <youett@math.fu-berlin.de>
Date: Tue, 8 Nov 2016 10:37:49 +0100
Subject: [PATCH] Make obstacleRestrictor protected and add a setter

---
 dune/solvers/iterationsteps/mmgstep.hh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dune/solvers/iterationsteps/mmgstep.hh b/dune/solvers/iterationsteps/mmgstep.hh
index c42d2775..a8bed74f 100644
--- a/dune/solvers/iterationsteps/mmgstep.hh
+++ b/dune/solvers/iterationsteps/mmgstep.hh
@@ -57,7 +57,10 @@ public:
     //! Set the obstacle field
     void setObstacles(ObstacleVectorType* obstacles) {obstacles_ = obstacles;}
 
-    std::shared_ptr<ObstacleRestrictor<VectorType> > obstacleRestrictor_;
+    //! Set the obstacle restrictor
+    void setObstacleRestrictor(std::shared_ptr<ObstacleRestrictor<VectorType> > restrictor) {
+        obstacleRestrictor_ = restrictor;
+    }
 
     //! Bitfield determining which fine grid nodes have an obstacle
     Dune::BitSetVector<dim>* hasObstacle_;
@@ -70,6 +73,9 @@ public:
     Dune::BitSetVector<dim> oldCritical;
 
 protected:
+    //! The restrictor used to construct the coarse obstacles
+    std::shared_ptr<ObstacleRestrictor<VectorType> > obstacleRestrictor_;
+
     //! Bitfield hierarchy containing the coarse obstacle nodes
     std::vector<Dune::BitSetVector<dim>* > hasObstacleHierarchy_;
 
-- 
GitLab