From 49c8f5c478678878446346205afc59e8b5c804f1 Mon Sep 17 00:00:00 2001
From: Katharina Heck <katharina.heck@iws.uni-stuttgart.de>
Date: Wed, 20 Dec 2017 16:10:37 +0100
Subject: [PATCH] [feature][fluxvariables] allow heatconduction calculation for
 each phase

---
 dumux/porousmediumflow/fluxvariables.hh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/dumux/porousmediumflow/fluxvariables.hh b/dumux/porousmediumflow/fluxvariables.hh
index f928453830..2132d520c6 100644
--- a/dumux/porousmediumflow/fluxvariables.hh
+++ b/dumux/porousmediumflow/fluxvariables.hh
@@ -61,6 +61,7 @@ class PorousMediumFluxVariables : public FluxVariablesBase<TypeTag>
     static constexpr bool enableAdvection = GET_PROP_VALUE(TypeTag, EnableAdvection);
     static constexpr bool enableMolecularDiffusion = GET_PROP_VALUE(TypeTag, EnableMolecularDiffusion);
     static constexpr bool enableEnergyBalance = GET_PROP_VALUE(TypeTag, EnableEnergyBalance);
+    static constexpr bool enableThermalNonEquilibrium = GET_PROP_VALUE(TypeTag, EnableThermalNonEquilibrium);
 
 public:
 
@@ -115,6 +116,7 @@ public:
         }
     }
 
+    template <bool enable = !enableThermalNonEquilibrium, typename std::enable_if_t<enable, int> = 0>
     Scalar heatConductionFlux() const
     {
         if (enableEnergyBalance)
@@ -132,6 +134,19 @@ public:
         }
     }
 
+    template <bool enable = enableThermalNonEquilibrium, typename std::enable_if_t<enable, int> = 0>
+    Scalar heatConductionFlux(const int phaseIdx) const
+    {
+            return HeatConductionType::flux(this->problem(),
+                                            this->element(),
+                                            this->fvGeometry(),
+                                            this->elemVolVars(),
+                                            this->scvFace(),
+                                            phaseIdx,
+                                            this->elemFluxVarsCache());
+
+    }
+
 private:
     //! simple caching if advection flux is used twice with different upwind function
     mutable std::bitset<numPhases> advFluxIsCached_;
-- 
GitLab