From 5c45ec10493ce41246dce7d4f31f5da619e13906 Mon Sep 17 00:00:00 2001
From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de>
Date: Wed, 19 Jul 2017 15:19:49 +0200
Subject: [PATCH] [staggered][model] Fix elementSolution

* use integral_constant instead of int in order to access the whole
  cell-center related privars vector
---
 dumux/implicit/staggered/model.hh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/dumux/implicit/staggered/model.hh b/dumux/implicit/staggered/model.hh
index 30a874dbc3..a62aa33a35 100644
--- a/dumux/implicit/staggered/model.hh
+++ b/dumux/implicit/staggered/model.hh
@@ -270,10 +270,17 @@ public:
         }
     }
 
+    /*!
+    * \brief Returns the element solution
+    *
+    * \param element The element
+    * \param sol The solution vector
+    * \NOTE: Only returns cell-center related values. Might be revised if face data are needed as well.
+    */
     ElementSolution elementSolution(const Element& element, const SolutionVector& sol) const
     {
         PrimaryVariables priVars(0.0);
-        priVars[0] = sol[cellCenterIdx][this->elementMapper().index(element)];
+        priVars[cellCenterIdx] = sol[cellCenterIdx][this->elementMapper().index(element)];
         return ElementSolution{std::move(priVars)};
     }
 
-- 
GitLab