From 0cbdeb13ab6a6a9147aecc690dc3f691281c88a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= <dennis.glaeser@iws.uni-stuttgart.de>
Date: Mon, 17 Dec 2018 16:47:26 +0100
Subject: [PATCH] [mpfa][fluxlaws] use correct flux sign switch query

---
 dumux/flux/ccmpfa/darcyslaw.hh   | 2 +-
 dumux/flux/ccmpfa/fickslaw.hh    | 2 +-
 dumux/flux/ccmpfa/fourierslaw.hh | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dumux/flux/ccmpfa/darcyslaw.hh b/dumux/flux/ccmpfa/darcyslaw.hh
index 10d186ec21..ce6543d152 100644
--- a/dumux/flux/ccmpfa/darcyslaw.hh
+++ b/dumux/flux/ccmpfa/darcyslaw.hh
@@ -201,7 +201,7 @@ private:
                                                        : dataHandle.gOutside()[localFaceIdx][idxInOutside]);
 
         // switch the sign if necessary
-        if (cache.advectionSwitchFluxSign())
+        if (switchSign)
             scvfFlux *= -1.0;
 
         return scvfFlux;
diff --git a/dumux/flux/ccmpfa/fickslaw.hh b/dumux/flux/ccmpfa/fickslaw.hh
index bf568d6d07..6cc0b3144e 100644
--- a/dumux/flux/ccmpfa/fickslaw.hh
+++ b/dumux/flux/ccmpfa/fickslaw.hh
@@ -234,7 +234,7 @@ private:
         Scalar scvfFlux = tij*xj;
 
         // switch the sign if necessary
-        if (cache.advectionSwitchFluxSign())
+        if (switchSign)
             scvfFlux *= -1.0;
 
         return scvfFlux;
diff --git a/dumux/flux/ccmpfa/fourierslaw.hh b/dumux/flux/ccmpfa/fourierslaw.hh
index 7b56dfb9e5..761f04a063 100644
--- a/dumux/flux/ccmpfa/fourierslaw.hh
+++ b/dumux/flux/ccmpfa/fourierslaw.hh
@@ -178,7 +178,7 @@ private:
                         const FluxVarsCache& cache,
                         const DataHandle& dataHandle)
     {
-        const bool switchSign = cache.advectionSwitchFluxSign();
+        const bool switchSign = cache.heatConductionSwitchFluxSign();
 
         const auto localFaceIdx = cache.ivLocalFaceIndex();
         const auto idxInOutside = cache.indexInOutsideFaces();
@@ -189,7 +189,7 @@ private:
         Scalar scvfFlux = tij*Tj;
 
         // switch the sign if necessary
-        if (cache.advectionSwitchFluxSign())
+        if (switchSign)
             scvfFlux *= -1.0;
 
         return scvfFlux;
-- 
GitLab