From e3e09bbc66ce908932f80f1e17dcf7cd40bb0ace Mon Sep 17 00:00:00 2001
From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de>
Date: Thu, 2 Nov 2017 11:55:55 +0100
Subject: [PATCH] [freeflow][fluxVars] Make upwindWeight variable static

* get method is very expensive
---
 dumux/freeflow/staggered/fluxvariables.hh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dumux/freeflow/staggered/fluxvariables.hh b/dumux/freeflow/staggered/fluxvariables.hh
index 86a2e12b12..b0c09bd413 100644
--- a/dumux/freeflow/staggered/fluxvariables.hh
+++ b/dumux/freeflow/staggered/fluxvariables.hh
@@ -117,7 +117,7 @@ public:
         const auto& upstreamVolVars = insideIsUpstream ? insideVolVars : outsideVolVars;
         const auto& downstreamVolVars = insideIsUpstream ? insideVolVars : outsideVolVars;
 
-        const Scalar upWindWeight = getParamFromGroup<Scalar>(GET_PROP_VALUE(TypeTag, ModelParameterGroup), "Implicit.UpwindWeight");
+        static const Scalar upWindWeight = getParamFromGroup<Scalar>(GET_PROP_VALUE(TypeTag, ModelParameterGroup), "Implicit.UpwindWeight");
 
         flux = (upWindWeight * upstreamVolVars.density() +
                (1.0 - upWindWeight) * downstreamVolVars.density()) * velocity;
-- 
GitLab