From db40bc7c246754077b0be40da3f3952bdb194e10 Mon Sep 17 00:00:00 2001
From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de>
Date: Tue, 28 Mar 2017 17:17:40 +0200
Subject: [PATCH] [staggeredGrid][localJacobian] Fix compiler error with clang

* clang yielded a linker error related to the array-type baseEps
---
 dumux/implicit/staggered/localjacobian.hh    | 4 ++--
 dumux/implicit/staggered/propertydefaults.hh | 7 +++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/dumux/implicit/staggered/localjacobian.hh b/dumux/implicit/staggered/localjacobian.hh
index 31c2b42c60..dc53aa06c7 100644
--- a/dumux/implicit/staggered/localjacobian.hh
+++ b/dumux/implicit/staggered/localjacobian.hh
@@ -120,7 +120,6 @@ public:
     StaggeredLocalJacobian()
     {
         numericDifferenceMethod_ = GET_PARAM_FROM_GROUP(TypeTag, int, Implicit, NumericDifferenceMethod);
-        baseEps_ = GET_PROP_VALUE(TypeTag, BaseEpsilon);
     }
 
     /*!
@@ -573,7 +572,8 @@ protected:
 
     AssemblyMap assemblyMap_;
 
-    std::array<std::array<Scalar, 2>, 2> baseEps_;
+    using BaseEpsilon = typename GET_PROP(TypeTag, BaseEpsilon);
+    const std::array<std::array<Scalar, 2>, 2> baseEps_ = BaseEpsilon::getEps();
 };
 
 }
diff --git a/dumux/implicit/staggered/propertydefaults.hh b/dumux/implicit/staggered/propertydefaults.hh
index d9c8d6679a..b5d4e3c4fa 100644
--- a/dumux/implicit/staggered/propertydefaults.hh
+++ b/dumux/implicit/staggered/propertydefaults.hh
@@ -262,8 +262,11 @@ private:
     static constexpr Scalar dFacedFace = 1e-8;
 
 public:
-    static constexpr std::array<std::array<Scalar, 2>, 2> value{{{dCCdCC,   dCCdFace},
-                                                                 {dFacedCC, dFacedFace}}};
+    static constexpr auto getEps()
+    {
+        return std::array<std::array<Scalar, 2>, 2>{{{dCCdCC, dCCdFace},
+                                                     {dFacedCC, dFacedFace}}};
+    }
 };
 
 } // namespace Properties
-- 
GitLab