From 8577dfb5cee5fc2f9bdfab8b5a7d276978e1b13f Mon Sep 17 00:00:00 2001
From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de>
Date: Sat, 10 Mar 2018 10:00:58 +0100
Subject: [PATCH] [navierstokes] Clean-up volVars

---
 .../freeflow/navierstokes/volumevariables.hh  | 30 ++++++++-----------
 1 file changed, 12 insertions(+), 18 deletions(-)

diff --git a/dumux/freeflow/navierstokes/volumevariables.hh b/dumux/freeflow/navierstokes/volumevariables.hh
index d13997dba8..8204bd3c56 100644
--- a/dumux/freeflow/navierstokes/volumevariables.hh
+++ b/dumux/freeflow/navierstokes/volumevariables.hh
@@ -50,13 +50,8 @@ template <class TypeTag>
 class NavierStokesVolumeVariablesImplementation<TypeTag, false>
 {
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
-    using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
-    using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
-    using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
-    using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
-    using Element = typename GridView::template Codim<0>::Entity;
+    using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
 
     static const int phaseIdx = GET_PROP_VALUE(TypeTag, PhaseIdx);
 
@@ -73,7 +68,7 @@ public:
      * \param element An element which contains part of the control volume
      * \param scv The sub-control volume
      */
-    template<class ElementSolution>
+    template<class ElementSolution, class Problem, class Element, class SubControlVolume>
     void update(const ElementSolution &elemSol,
                 const Problem &problem,
                 const Element &element,
@@ -87,7 +82,7 @@ public:
     /*!
      * \brief Returns the primary variables at the dof associated with a given scv.
      */
-    template<class ElementSolution>
+    template<class ElementSolution, class SubControlVolume>
     static const auto& extractDofPriVars(const ElementSolution& elemSol,
                                          const SubControlVolume& scv)
     { return elemSol[0]; }
@@ -95,7 +90,7 @@ public:
     /*!
      * \brief Update the fluid state
      */
-    template<class ElementSolution>
+    template<class ElementSolution, class Problem, class Element, class SubControlVolume>
     static void completeFluidState(const ElementSolution& elemSol,
                                    const Problem& problem,
                                    const Element& element,
@@ -197,7 +192,7 @@ public:
     { return fluidState_; }
 
     //! The temperature is obtained from the problem as a constant for isothermal models
-    template<class ElementSolution>
+    template<class ElementSolution, class Problem, class Element, class SubControlVolume>
     static Scalar temperature(const ElementSolution &elemSol,
                               const Problem& problem,
                               const Element &element,
@@ -208,7 +203,7 @@ public:
 
     //! The phase enthalpy is zero for isothermal models
     //! This is needed for completing the fluid state
-    template<class FluidState, class ParameterCache>
+    template<class ParameterCache>
     static Scalar enthalpy(const FluidState& fluidState,
                            const ParameterCache& paramCache)
     {
@@ -230,10 +225,10 @@ class NavierStokesVolumeVariablesImplementation<TypeTag, true>
 {
     using ParentType = NavierStokesVolumeVariablesImplementation<TypeTag, false>;
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
-    using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
-    using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
+    using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
+    using FVElementGeometry = typename FVGridGeometry::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
+    using GridView = typename FVGridGeometry::GridView;
     using Element = typename GridView::template Codim<0>::Entity;
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
@@ -241,7 +236,6 @@ class NavierStokesVolumeVariablesImplementation<TypeTag, true>
     static const int phaseIdx = GET_PROP_VALUE(TypeTag, PhaseIdx);
     static const int temperatureIdx = Indices::temperatureIdx;
 
-
 public:
 
     using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState);
@@ -255,7 +249,7 @@ public:
      * \param element An element which contains part of the control volume
      * \param scv The sub-control volume
      */
-    template<class ElementSolution>
+    template<class ElementSolution, class Problem, class Element, class SubControlVolume>
     void update(const ElementSolution &elemSol,
                 const Problem &problem,
                 const Element &element,
@@ -269,7 +263,7 @@ public:
     /*!
      * \brief Update the fluid state
      */
-    template<class ElementSolution>
+    template<class ElementSolution, class Problem, class Element, class SubControlVolume>
     static void completeFluidState(const ElementSolution& elemSol,
                                    const Problem& problem,
                                    const Element& element,
@@ -334,7 +328,7 @@ public:
 
     //! The temperature is a primary variable for non-isothermal models
     using ParentType::temperature;
-    template<class ElementSolution>
+    template<class ElementSolution, class Problem, class Element, class SubControlVolume>
     static Scalar temperature(const ElementSolution &elemSol,
                               const Problem& problem,
                               const Element &element,
-- 
GitLab