From c481c5657c1b5e447adab92823736946948a9b05 Mon Sep 17 00:00:00 2001
From: Simon Praetorius <simon.praetorius@tu-dresden.de>
Date: Tue, 10 Sep 2019 00:26:09 +0200
Subject: [PATCH] Return stored MPIHelper from Environment

---
 src/amdis/Environment.hpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/amdis/Environment.hpp b/src/amdis/Environment.hpp
index 21abf85c..8ad75143 100644
--- a/src/amdis/Environment.hpp
+++ b/src/amdis/Environment.hpp
@@ -44,6 +44,11 @@ namespace AMDiS
         return mpiHelper_->size();
       }
 
+      Dune::MPIHelper& mpiHelper()
+      {
+        return *mpiHelper_;
+      }
+
     private:
       Dune::MPIHelper* mpiHelper_ = nullptr;
     };
@@ -71,6 +76,12 @@ namespace AMDiS
       return Mpi::instance().size();
     }
 
+    /// Return a reference to the stored \ref MPIHelper
+    static Dune::MPIHelper& mpiHelper()
+    {
+      return Mpi::instance().mpiHelper();
+    }
+
     /// Return the MPI_Comm object (or a fake communicator)
     static typename Dune::MPIHelper::MPICommunicator comm()
     {
-- 
GitLab