From e48102232d30b0a621eaec5239708164e4775d42 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Mon, 5 Mar 2018 15:50:59 +0100
Subject: [PATCH] [elementsolution][test] Make elemsol a template argument

---
 .../1p/implicit/1pniconductionproblem.hh      |  4 +-
 .../1p/implicit/1pniconvectionproblem.hh      |  4 +-
 .../1p/implicit/1ptestspatialparams.hh        | 11 +++--
 .../1p/implicit/compressible/spatialparams.hh | 10 ++---
 .../implicit/incompressible/spatialparams.hh  | 10 ++---
 .../1psingularityspatialparams.hh             | 10 ++---
 .../1p/implicit/tubesproblem.hh               | 21 +++++-----
 .../1p/implicit/tubesspatialparams.hh         | 10 ++---
 .../1pnc/implicit/1p2cniconductionproblem.hh  |  4 +-
 .../1pnc/implicit/1p2cniconvectionproblem.hh  |  4 +-
 .../1pnc/implicit/1p2ctestproblem.hh          |  9 ++--
 .../1pnc/implicit/1pnctestspatialparams.hh    | 16 +++----
 .../1pncmin/implicit/thermochemproblem.hh     |  6 +--
 .../implicit/thermochemspatialparams.hh       | 41 ++++++++++--------
 .../implicit/incompressible/spatialparams.hh  | 10 ++---
 .../implicit/steaminjectionspatialparams.hh   | 13 +++---
 .../2p2c_comparison_spatialparams.hh          | 17 ++++----
 .../2pnc/implicit/fuelcellproblem.hh          |  8 ++--
 .../2pncmin/implicit/dissolutionproblem.hh    |  4 +-
 .../implicit/dissolutionspatialparams.hh      | 17 ++++----
 .../3p/implicit/3pniconductionproblem.hh      |  4 +-
 .../3p/implicit/3pniconvectionproblem.hh      |  4 +-
 .../implicit/infiltration3pspatialparams.hh   |  8 ++--
 .../3p3c/implicit/columnxylolspatialparams.hh | 27 +++++++-----
 .../implicit/infiltration3p3cspatialparams.hh |  8 ++--
 .../3p3c/implicit/kuevettespatialparams.hh    | 24 ++++++-----
 .../implicit/3pwateroilsagdspatialparams.hh   | 11 ++---
 .../heterogeneousspatialparameters.hh         | 11 ++---
 .../mpnc_comparison_spatialparams.hh          | 18 ++++----
 .../mpnc/implicit/combustionspatialparams.hh  | 32 +++++++-------
 .../evaporationatmospherespatialparams.hh     | 42 ++++++++++---------
 .../mpnc/implicit/obstaclespatialparams.hh    | 11 ++---
 .../mpnc/implicit/plotoverline2d.hh           |  3 +-
 .../implicit/richardsniconductionproblem.hh   |  4 +-
 .../implicit/richardsniconvectionproblem.hh   |  4 +-
 .../tracer/1ptracer/1ptestspatialparams.hh    | 11 ++---
 .../1ptracer/tracertestspatialparams.hh       |  8 ++--
 .../constvel/tracertestspatialparams.hh       |  7 ++--
 .../multicomp/maxwellstefantestproblem.hh     |  4 +-
 .../maxwellstefantestspatialparams.hh         |  7 ++--
 40 files changed, 249 insertions(+), 228 deletions(-)

diff --git a/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh b/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh
index d8395c300b..4fed1505c4 100644
--- a/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh
+++ b/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh
@@ -27,6 +27,7 @@
 
 #include <math.h>
 
+#include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/box/properties.hh>
 #include <dumux/discretization/cellcentered/tpfa/properties.hh>
 #include <dumux/discretization/cellcentered/mpfa/properties.hh>
@@ -105,7 +106,6 @@ class OnePNIConductionProblem : public PorousMediumFlowProblem<TypeTag>
     using ThermalConductivityModel = typename GET_PROP_TYPE(TypeTag, ThermalConductivityModel);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using IapwsH2O = H2O<Scalar>;
 
     enum { dimWorld = GridView::dimensionworld };
@@ -144,7 +144,7 @@ public:
     {
         const auto someElement = *(elements(this->fvGridGeometry().gridView()).begin());
 
-        ElementSolutionVector someElemSol(someElement, curSol, this->fvGridGeometry());
+        auto someElemSol = elementSolution(someElement, curSol, this->fvGridGeometry());
         const auto someInitSol = initialAtPos(someElement.geometry().center());
 
         auto fvGeometry = localView(this->fvGridGeometry());
diff --git a/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh b/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh
index 34fbf7f18e..051db2b52e 100644
--- a/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh
+++ b/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh
@@ -28,6 +28,7 @@
 
 #include <math.h>
 
+#include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/box/properties.hh>
 #include <dumux/discretization/cellcentered/tpfa/properties.hh>
 #include <dumux/discretization/cellcentered/mpfa/properties.hh>
@@ -107,7 +108,6 @@ class OnePNIConvectionProblem : public PorousMediumFlowProblem<TypeTag>
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using IapwsH2O = H2O<Scalar>;
 
     enum { dimWorld = GridView::dimensionworld };
@@ -159,7 +159,7 @@ public:
     {
         const auto someElement = *(elements(this->fvGridGeometry().gridView()).begin());
 
-        ElementSolutionVector someElemSol(someElement, curSol, this->fvGridGeometry());
+        auto someElemSol = elementSolution(someElement, curSol, this->fvGridGeometry());
         const auto someInitSol = initialAtPos(someElement.geometry().center());
 
         auto fvGeometry = localView(this->fvGridGeometry());
diff --git a/test/porousmediumflow/1p/implicit/1ptestspatialparams.hh b/test/porousmediumflow/1p/implicit/1ptestspatialparams.hh
index cf87b00255..c136cd4375 100644
--- a/test/porousmediumflow/1p/implicit/1ptestspatialparams.hh
+++ b/test/porousmediumflow/1p/implicit/1ptestspatialparams.hh
@@ -28,15 +28,14 @@
 #include <dumux/material/spatialparams/fv1p.hh>
 #include <dumux/material/spatialparams/gstatrandomfield.hh>
 
-namespace Dumux
-{
+namespace Dumux {
 
 //forward declaration
 template<class TypeTag>
 class OnePTestSpatialParams;
 
-namespace Properties
-{
+namespace Properties {
+
 // The spatial parameters TypeTag
 NEW_TYPE_TAG(OnePTestSpatialParams);
 }
@@ -53,7 +52,6 @@ class OnePTestSpatialParams : public FVSpatialParamsOneP<TypeTag>
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
     using IndexSet = typename GridView::IndexSet;
@@ -94,9 +92,10 @@ public:
      * \param elemSol The element solution vector
      * \return the intrinsic permeability
      */
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         if (isInLens_(scv.dofPosition()))
         {
diff --git a/test/porousmediumflow/1p/implicit/compressible/spatialparams.hh b/test/porousmediumflow/1p/implicit/compressible/spatialparams.hh
index 94a6a0f1d2..fd712b98ca 100644
--- a/test/porousmediumflow/1p/implicit/compressible/spatialparams.hh
+++ b/test/porousmediumflow/1p/implicit/compressible/spatialparams.hh
@@ -26,8 +26,7 @@
 
 #include <dumux/material/spatialparams/fv1p.hh>
 
-namespace Dumux
-{
+namespace Dumux {
 
 /*!
  * \ingroup OnePTests
@@ -44,7 +43,6 @@ class OnePTestSpatialParams : public FVSpatialParamsOneP<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     static constexpr int dimWorld = GridView::dimensionworld;
     using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
@@ -69,9 +67,10 @@ public:
      * \param elemSol The element solution vector
      * \return the intrinsic permeability
      */
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         if (isInLens_(scv.dofPosition()))
             return permeabilityLens_;
@@ -88,9 +87,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return the porosity
      */
+    template<class ElementSolution>
     Scalar porosity(const Element &element,
                         const SubControlVolume &scv,
-                        const ElementSolutionVector &elemSol) const
+                        const ElementSolution &elemSol) const
     { return 0.4; }
 
 private:
diff --git a/test/porousmediumflow/1p/implicit/incompressible/spatialparams.hh b/test/porousmediumflow/1p/implicit/incompressible/spatialparams.hh
index f406d50aca..7c4f1e55a3 100644
--- a/test/porousmediumflow/1p/implicit/incompressible/spatialparams.hh
+++ b/test/porousmediumflow/1p/implicit/incompressible/spatialparams.hh
@@ -26,8 +26,7 @@
 
 #include <dumux/material/spatialparams/fv1p.hh>
 
-namespace Dumux
-{
+namespace Dumux {
 
 /*!
  * \ingroup OnePTests
@@ -44,7 +43,6 @@ class OnePTestSpatialParams : public FVSpatialParamsOneP<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     static constexpr int dimWorld = GridView::dimensionworld;
     using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
@@ -69,9 +67,10 @@ public:
      * \param elemSol The element solution vector
      * \return the intrinsic permeability
      */
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         if (isInLens_(scv.dofPosition()))
             return permeabilityLens_;
@@ -88,9 +87,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return the porosity
      */
+    template<class ElementSolution>
     Scalar porosity(const Element &element,
                         const SubControlVolume &scv,
-                        const ElementSolutionVector &elemSol) const
+                        const ElementSolution &elemSol) const
     { return 0.4; }
 
 private:
diff --git a/test/porousmediumflow/1p/implicit/pointsources/1psingularityspatialparams.hh b/test/porousmediumflow/1p/implicit/pointsources/1psingularityspatialparams.hh
index 96cfdf489e..7ce06edc5b 100644
--- a/test/porousmediumflow/1p/implicit/pointsources/1psingularityspatialparams.hh
+++ b/test/porousmediumflow/1p/implicit/pointsources/1psingularityspatialparams.hh
@@ -27,8 +27,7 @@
 
 #include <dumux/material/spatialparams/fv1p.hh>
 
-namespace Dumux
-{
+namespace Dumux {
 
 /*!
  * \ingroup OnePTests
@@ -43,7 +42,6 @@ class OnePSingularitySpatialParams : public FVSpatialParamsOneP<TypeTag>
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
 
@@ -66,9 +64,10 @@ public:
      * \param elemSol The element solution vector
      * \return the intrinsic permeability
      */
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         return permeability_;
     }
@@ -80,9 +79,10 @@ public:
      * \param elemSol The element solution vector
      * \return the porosity
      */
+    template<class ElementSolution>
     Scalar porosity(const Element& element,
                     const SubControlVolume& scv,
-                    const ElementSolutionVector& elemSol) const
+                    const ElementSolution& elemSol) const
     {
         return porosity_;
     }
diff --git a/test/porousmediumflow/1p/implicit/tubesproblem.hh b/test/porousmediumflow/1p/implicit/tubesproblem.hh
index 8da64e4359..b8e71e6e22 100644
--- a/test/porousmediumflow/1p/implicit/tubesproblem.hh
+++ b/test/porousmediumflow/1p/implicit/tubesproblem.hh
@@ -31,6 +31,7 @@
 #include <dumux/discretization/cellcentered/tpfa/properties.hh>
 #include <dumux/discretization/box/properties.hh>
 #include <dumux/discretization/methods.hh>
+#include <dumux/discretization/elementsolution.hh>
 #include <dumux/porousmediumflow/1p/model.hh>
 #include <dumux/porousmediumflow/problem.hh>
 #include <dumux/material/components/constant.hh>
@@ -38,13 +39,13 @@
 
 #include "tubesspatialparams.hh"
 
-namespace Dumux
-{
+namespace Dumux {
+
 template <class TypeTag>
 class TubesTestProblem;
 
-namespace Properties
-{
+namespace Properties {
+
 NEW_TYPE_TAG(TubesTestTypeTag, INHERITS_FROM(OneP));
 NEW_TYPE_TAG(TubesTestCCTpfaTypeTag, INHERITS_FROM(CCTpfaModel, TubesTestTypeTag));
 NEW_TYPE_TAG(TubesTestBoxTypeTag, INHERITS_FROM(BoxModel, TubesTestTypeTag));
@@ -78,7 +79,6 @@ class TubesTestProblem : public PorousMediumFlowProblem<TypeTag>
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     // Grid and world dimension
     static const int dim = GridView::dimension;
@@ -146,9 +146,10 @@ public:
      * thought as pipes with a cross section of 1 m^2 and 2D problems
      * are assumed to extend 1 m to the back.
      */
+    template<class ElementSolution>
     Scalar extrusionFactor(const Element &element,
                            const SubControlVolume &scv,
-                           const ElementSolutionVector& elemSol) const
+                           const ElementSolution& elemSol) const
     {
         const auto radius = this->spatialParams().radius(scv);
         return M_PI*radius*radius;
@@ -212,15 +213,15 @@ public:
      * E.g. for the mass balance that would be a mass rate in \f$ [ kg / (m^3 \cdot s)] \f$.
      */
     NumEqVector source(const Element &element,
-                            const FVElementGeometry& fvGeometry,
-                            const ElementVolumeVariables& elemVolVars,
-                            const SubControlVolume &scv) const
+                       const FVElementGeometry& fvGeometry,
+                       const ElementVolumeVariables& elemVolVars,
+                       const SubControlVolume &scv) const
     {
         NumEqVector source(0.0);
 
         const auto& globalPos = scv.center();
         const auto& volVars = elemVolVars[scv];
-        const auto K = this->spatialParams().permeability(element, scv, ElementSolutionVector());
+        const auto K = this->spatialParams().permeability(element, scv, EmptyElementSolution{});
 
         using std::sin;
         if (globalPos[2] > 0.5 - eps_)
diff --git a/test/porousmediumflow/1p/implicit/tubesspatialparams.hh b/test/porousmediumflow/1p/implicit/tubesspatialparams.hh
index a1182288d8..664c922bc8 100644
--- a/test/porousmediumflow/1p/implicit/tubesspatialparams.hh
+++ b/test/porousmediumflow/1p/implicit/tubesspatialparams.hh
@@ -27,8 +27,7 @@
 
 #include <dumux/material/spatialparams/fv1p.hh>
 
-namespace Dumux
-{
+namespace Dumux {
 
 /*!
  * \ingroup OnePTests
@@ -43,7 +42,6 @@ class TubesTestSpatialParams : public FVSpatialParamsOneP<TypeTag>
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
 
@@ -81,9 +79,10 @@ public:
      * \param elemSol The element solution vector
      * \return the intrinsic permeability
      */
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         const Scalar radius = this->radius(scv);
         const Scalar gamma = 2; // quadratic velocity profile (Poiseuille flow)
@@ -98,9 +97,10 @@ public:
      * \param elemSol The element solution vector
      * \return the porosity
      */
+    template<class ElementSolution>
     Scalar porosity(const Element& element,
                     const SubControlVolume& scv,
-                    const ElementSolutionVector& elemSol) const
+                    const ElementSolution& elemSol) const
     { return 1.0; }
 
 private:
diff --git a/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh b/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh
index 6976e78a6f..cfff08e641 100644
--- a/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh
+++ b/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh
@@ -25,6 +25,7 @@
 #ifndef DUMUX_1P2CNI_CONDUCTION_TEST_PROBLEM_HH
 #define DUMUX_1P2CNI_CONDUCTION_TEST_PROBLEM_HH
 
+#include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/cellcentered/tpfa/properties.hh>
 #include <dumux/discretization/cellcentered/mpfa/properties.hh>
 #include <dumux/discretization/box/properties.hh>
@@ -108,7 +109,6 @@ class OnePTwoCNIConductionProblem : public PorousMediumFlowProblem<TypeTag>
     using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
     using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using Element = typename GridView::template Codim<0>::Entity;
     using ThermalConductivityModel = typename GET_PROP_TYPE(TypeTag, ThermalConductivityModel);
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
@@ -158,7 +158,7 @@ public:
     {
         const auto someElement = *(elements(this->fvGridGeometry().gridView()).begin());
 
-        ElementSolutionVector someElemSol(someElement, curSol, this->fvGridGeometry());
+        auto someElemSol = elementSolution(someElement, curSol, this->fvGridGeometry());
         const auto someInitSol = initialAtPos(someElement.geometry().center());
 
         auto fvGeometry = localView(this->fvGridGeometry());
diff --git a/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh b/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh
index e640519560..6996c812cc 100644
--- a/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh
+++ b/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh
@@ -25,6 +25,7 @@
 #ifndef DUMUX_1P2CNI_CONVECTION_TEST_PROBLEM_HH
 #define DUMUX_1P2CNI_CONVECTION_TEST_PROBLEM_HH
 
+#include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/cellcentered/tpfa/properties.hh>
 #include <dumux/discretization/cellcentered/mpfa/properties.hh>
 #include <dumux/discretization/box/properties.hh>
@@ -111,7 +112,6 @@ class OnePTwoCNIConvectionProblem : public PorousMediumFlowProblem<TypeTag>
     using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
     using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using Element = typename GridView::template Codim<0>::Entity;
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
@@ -167,7 +167,7 @@ public:
     {
         const auto someElement = *(elements(this->fvGridGeometry().gridView()).begin());
 
-        ElementSolutionVector someElemSol(someElement, curSol, this->fvGridGeometry());
+        auto someElemSol = elementSolution(someElement, curSol, this->fvGridGeometry());
         const auto someInitSol = initialAtPos(someElement.geometry().center());
 
         auto fvGeometry = localView(this->fvGridGeometry());
diff --git a/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh b/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh
index 51a7d70eac..fca78862a6 100644
--- a/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh
+++ b/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh
@@ -112,7 +112,6 @@ class OnePTwoCTestProblem : public PorousMediumFlowProblem<TypeTag>
     using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
     using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using Element = typename GridView::template Codim<0>::Entity;
 
     // copy some indices for convenience
@@ -252,9 +251,9 @@ public:
         }
 
         // construct the element solution
-        const auto elementSolution = [&]()
+        const auto elemSol = [&]()
         {
-            ElementSolutionVector sol(element, elemVolVars, fvGeometry);
+            auto sol = elementSolution(element, elemVolVars, fvGeometry);
 
             if(isBox)
                 for(auto&& scvf : scvfs(fvGeometry))
@@ -269,14 +268,14 @@ public:
         {
             if(isBox)
             {
-                const auto grads = evalGradients(element, element.geometry(), fvGeometry.fvGridGeometry(), elementSolution, ipGlobal);
+                const auto grads = evalGradients(element, element.geometry(), fvGeometry.fvGridGeometry(), elemSol, ipGlobal);
                 return grads[pressureIdx];
             }
 
             else
             {
                 const auto& scvCenter = fvGeometry.scv(scvf.insideScvIdx()).center();
-                const Scalar scvCenterPresureSol = elementSolution[0][pressureIdx];
+                const Scalar scvCenterPresureSol = elemSol[0][pressureIdx];
                 auto grad = ipGlobal - scvCenter;
                 grad /= grad.two_norm2();
                 grad *= (dirichletPressure - scvCenterPresureSol);
diff --git a/test/porousmediumflow/1pnc/implicit/1pnctestspatialparams.hh b/test/porousmediumflow/1pnc/implicit/1pnctestspatialparams.hh
index 0004c18f41..4022d5073b 100644
--- a/test/porousmediumflow/1pnc/implicit/1pnctestspatialparams.hh
+++ b/test/porousmediumflow/1pnc/implicit/1pnctestspatialparams.hh
@@ -27,8 +27,7 @@
 
 #include <dumux/material/spatialparams/fv1p.hh>
 
-namespace Dumux
-{
+namespace Dumux {
 
 /*!
  * \ingroup OnePNCTests
@@ -45,7 +44,6 @@ class OnePNCTestSpatialParams : public FVSpatialParamsOneP<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     static const int dimWorld = GridView::dimensionworld;
     using GlobalPosition = typename Dune::FieldVector<Scalar, dimWorld>;
@@ -87,9 +85,10 @@ public:
      * \param scv The sub-control volume
      * \param elemSol The solution for all dofs of the element
      */
+    template<class ElementSolution>
     Scalar dispersivity(const Element &element,
                         const SubControlVolume& scv,
-                        const ElementSolutionVector& elemSol) const
+                        const ElementSolution& elemSol) const
     { return 0; }
 
     /*!
@@ -101,9 +100,10 @@ public:
      * \param scv The sub control volume
      * \param elemSol The element solution vector
      */
+    template<class ElementSolution>
     Scalar solidHeatCapacity(const Element &element,
                              const SubControlVolume& scv,
-                             const ElementSolutionVector& elemSol) const
+                             const ElementSolution& elemSol) const
     { return 790; /*specific heat capacity of granite [J / (kg K)]*/ }
 
     /*!
@@ -115,9 +115,10 @@ public:
      * \param scv The sub control volume
      * \param elemSol The element solution vector
      */
+    template<class ElementSolution>
     Scalar solidDensity(const Element &element,
                         const SubControlVolume& scv,
-                        const ElementSolutionVector& elemSol) const
+                        const ElementSolution& elemSol) const
     { return 2700; /*density of granite [kg/m^3]*/ }
 
     /*!
@@ -127,9 +128,10 @@ public:
      * \param scv The sub control volume
      * \param elemSol The element solution vector
      */
+    template<class ElementSolution>
     Scalar solidThermalConductivity(const Element &element,
                                     const SubControlVolume& scv,
-                                    const ElementSolutionVector& elemSol) const
+                                    const ElementSolution& elemSol) const
     { return lambdaSolid_; }
 
 
diff --git a/test/porousmediumflow/1pncmin/implicit/thermochemproblem.hh b/test/porousmediumflow/1pncmin/implicit/thermochemproblem.hh
index 3debf5c193..7eb5efc219 100644
--- a/test/porousmediumflow/1pncmin/implicit/thermochemproblem.hh
+++ b/test/porousmediumflow/1pncmin/implicit/thermochemproblem.hh
@@ -25,6 +25,7 @@
 #define DUMUX_THERMOCHEM_PROBLEM_HH
 
 #include <dumux/porousmediumflow/1pncmin/model.hh>
+#include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/box/properties.hh>
 #include <dumux/discretization/cellcentered/tpfa/properties.hh>
 #include <dumux/discretization/cellcentered/mpfa/properties.hh>
@@ -99,7 +100,6 @@ class ThermoChemProblem : public PorousMediumFlowProblem<TypeTag>
     using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
     using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using ReactionRate =ThermoChemReaction<TypeTag>;
 
     enum { dim = GridView::dimension };
@@ -291,7 +291,7 @@ public:
 
         Scalar qMass = rrate_.thermoChemReaction(volVars);
 
-        ElementSolutionVector elemSol(element, elemVolVars, fvGeometry);
+        const auto elemSol = elementSolution(element, elemVolVars, fvGeometry);
         Scalar qMole = qMass/FluidSystem::molarMass(firstMoleFracIdx)*(1-this->spatialParams().porosity(element, scv, elemSol));
 
         // make sure not more solid reacts than present
@@ -343,7 +343,7 @@ public:
     {
         for (const auto& element : elements(this->fvGridGeometry().gridView()))
         {
-            ElementSolutionVector elemSol(element, curSol, this->fvGridGeometry());
+            const auto elemSol = elementSolution(element, curSol, this->fvGridGeometry());
 
             auto fvGeometry = localView(this->fvGridGeometry());
             fvGeometry.bindElement(element);
diff --git a/test/porousmediumflow/1pncmin/implicit/thermochemspatialparams.hh b/test/porousmediumflow/1pncmin/implicit/thermochemspatialparams.hh
index 7cef2d6836..8f2a534621 100644
--- a/test/porousmediumflow/1pncmin/implicit/thermochemspatialparams.hh
+++ b/test/porousmediumflow/1pncmin/implicit/thermochemspatialparams.hh
@@ -33,15 +33,14 @@
 #include <dumux/material/fluidmatrixinteractions/mineralization/effectivesoliddensity.hh>
 #include <dumux/material/fluidmatrixinteractions/mineralization/effectivesolidheatcapacity.hh>
 
-namespace Dumux
-{
+namespace Dumux {
 
 //forward declaration
 template<class TypeTag>
 class ThermoChemSpatialParams;
 
-namespace Properties
-{
+namespace Properties {
+
 // The spatial parameters TypeTag
 NEW_TYPE_TAG(ThermoChemSpatialParams);
 
@@ -65,7 +64,6 @@ class ThermoChemSpatialParams : public FVSpatialParamsOneP<TypeTag>
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using CoordScalar = typename GridView::ctype;
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     enum {
         dimWorld=GridView::dimensionworld,
@@ -138,9 +136,10 @@ public:
      *
      *  Solution dependent permeability function
      */
+    template<class ElementSolution>
     Scalar permeability(const Element& element,
                         const SubControlVolume& scv,
-                        const ElementSolutionVector& elemSol) const
+                        const ElementSolution& elemSol) const
     { return permLaw_.evaluatePermeability(element, scv, elemSol); }
 
     /*!
@@ -162,9 +161,10 @@ public:
      *  \param scv The sub-control volume
      *  \param elemSol The element solution
      */
+    template<class ElementSolution>
     Scalar porosity(const Element& element,
                     const SubControlVolume& scv,
-                    const ElementSolutionVector& elemSol) const
+                    const ElementSolution& elemSol) const
     {
 //         return poroLaw_.evaluatePorosity(element, scv, elemSol);
         return 0.8;
@@ -179,9 +179,10 @@ public:
      * \param scv The sub control volume
      * \param elemSol The element solution vector
      */
+    template<class ElementSolution>
     Scalar solidHeatCapacity(const Element &element,
                              const SubControlVolume& scv,
-                             const ElementSolutionVector& elemSol) const
+                             const ElementSolution& elemSol) const
     {
         return effSolCp_.effectiveSolidHeatCapacity(element, scv, elemSol);
     }
@@ -189,13 +190,14 @@ public:
     /*!
      * \brief Returns the heat capacity \f$[J / (kg K)]\f$ of the pure solid phases.
      */
-     Scalar solidPhaseHeatCapacity(const Element &element,
-                                    const SubControlVolume& scv,
-                                    const ElementSolutionVector& elemSol,
-                                    int sPhaseIdx) const
-     {
-         return cp_[sPhaseIdx];
-     }
+    template<class ElementSolution>
+    Scalar solidPhaseHeatCapacity(const Element &element,
+                                  const SubControlVolume& scv,
+                                  const ElementSolution& elemSol,
+                                  int sPhaseIdx) const
+    {
+        return cp_[sPhaseIdx];
+    }
 
     /*!
      * \brief Returns the average mass density \f$[kg / m^3]\f$ of the solid phases.
@@ -206,9 +208,10 @@ public:
      * \param scv The sub control volume
      * \param elemSol The element solution vector
      */
+    template<class ElementSolution>
     Scalar solidDensity(const Element &element,
                         const SubControlVolume& scv,
-                        const ElementSolutionVector& elemSol) const
+                        const ElementSolution& elemSol) const
     {
         return effSolRho_.effectiveSolidDensity(element, scv, elemSol);
     }
@@ -216,9 +219,10 @@ public:
     /*!
      * \brief Returns the mass density \f$[kg / m^3]\f$ of the pure solid phases.
      */
+    template<class ElementSolution>
     Scalar solidPhaseDensity(const Element &element,
                              const SubControlVolume& scv,
-                             const ElementSolutionVector& elemSol,
+                             const ElementSolution& elemSol,
                              int sPhaseIdx) const
     {
         return rho_[sPhaseIdx];
@@ -231,9 +235,10 @@ public:
      * \param scv The sub control volume
      * \param elemSol The element solution vector
      */
+    template<class ElementSolution>
     Scalar solidThermalConductivity(const Element &element,
                                     const SubControlVolume& scv,
-                                    const ElementSolutionVector& elemSol) const
+                                    const ElementSolution& elemSol) const
     { return lambdaSolid_; }
 
 private:
diff --git a/test/porousmediumflow/2p/implicit/incompressible/spatialparams.hh b/test/porousmediumflow/2p/implicit/incompressible/spatialparams.hh
index 788956c9fb..4f2c83b787 100644
--- a/test/porousmediumflow/2p/implicit/incompressible/spatialparams.hh
+++ b/test/porousmediumflow/2p/implicit/incompressible/spatialparams.hh
@@ -28,8 +28,7 @@
 #include <dumux/material/fluidmatrixinteractions/2p/regularizedvangenuchten.hh>
 #include <dumux/material/fluidmatrixinteractions/2p/efftoabslaw.hh>
 
-namespace Dumux
-{
+namespace Dumux {
 
 //forward declaration
 template<class TypeTag>
@@ -71,7 +70,6 @@ class TwoPTestSpatialParams : public FVSpatialParams<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
     using MaterialLawParams = typename MaterialLaw::Params;
 
@@ -113,9 +111,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return permeability
      */
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         if (isInLens_(element.geometry().center()))
             return lensK_;
@@ -139,9 +138,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return the material parameters object
      */
+    template<class ElementSolution>
     const MaterialLawParams& materialLawParams(const Element& element,
                                                const SubControlVolume& scv,
-                                               const ElementSolutionVector& elemSol) const
+                                               const ElementSolution& elemSol) const
     {
         if (isInLens_(element.geometry().center()))
             return lensMaterialParams_;
diff --git a/test/porousmediumflow/2p1c/implicit/steaminjectionspatialparams.hh b/test/porousmediumflow/2p1c/implicit/steaminjectionspatialparams.hh
index a141a789cf..4df9596a3b 100644
--- a/test/porousmediumflow/2p1c/implicit/steaminjectionspatialparams.hh
+++ b/test/porousmediumflow/2p1c/implicit/steaminjectionspatialparams.hh
@@ -29,8 +29,7 @@
 #include <dumux/material/fluidmatrixinteractions/2p/regularizedvangenuchten.hh>
 #include <dumux/material/fluidmatrixinteractions/2p/efftoabslaw.hh>
 
-namespace Dumux
-{
+namespace Dumux {
 
 //forward declaration
 template<class TypeTag>
@@ -75,7 +74,6 @@ class InjectionProblemSpatialParams : public FVSpatialParams<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     static constexpr int dimWorld = GridView::dimensionworld;
 
@@ -144,9 +142,10 @@ public:
      * \param scv The sub control volume
      * \param elemSol The element solution vector
      */
+    template<class ElementSolution>
     Scalar solidHeatCapacity(const Element &element,
                              const SubControlVolume& scv,
-                             const ElementSolutionVector& elemSol) const
+                             const ElementSolution& elemSol) const
     { return 850.0; /*specific heat capacity of granite [J / (kg K)]*/ }
 
     /*!
@@ -158,9 +157,10 @@ public:
      * \param scv The sub control volume
      * \param elemSol The element solution vector
      */
+    template<class ElementSolution>
     Scalar solidDensity(const Element &element,
                         const SubControlVolume& scv,
-                        const ElementSolutionVector& elemSol) const
+                        const ElementSolution& elemSol) const
     { return 2650; /*density of granite [kg/m^3]*/ }
 
     /*!
@@ -170,9 +170,10 @@ public:
      * \param scv The sub control volume
      * \param elemSol The element solution vector
      */
+    template<class ElementSolution>
     Scalar solidThermalConductivity(const Element &element,
                                     const SubControlVolume& scv,
-                                    const ElementSolutionVector& elemSol) const
+                                    const ElementSolution& elemSol) const
     { return 2.8; }
 
 private:
diff --git a/test/porousmediumflow/2p2c/implicit/mpnccomparison/2p2c_comparison_spatialparams.hh b/test/porousmediumflow/2p2c/implicit/mpnccomparison/2p2c_comparison_spatialparams.hh
index 174dc9e580..6f88714572 100644
--- a/test/porousmediumflow/2p2c/implicit/mpnccomparison/2p2c_comparison_spatialparams.hh
+++ b/test/porousmediumflow/2p2c/implicit/mpnccomparison/2p2c_comparison_spatialparams.hh
@@ -31,8 +31,8 @@
 
 #include <dumux/material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh>
 
-namespace Dumux
-{
+namespace Dumux {
+
 /*!
  * \ingroup MPNCTests
  * \brief The spatial parameters for the ObstacleProblem
@@ -41,8 +41,8 @@ namespace Dumux
 template<class TypeTag>
 class TwoPTwoCComparisonSpatialParams;
 
-namespace Properties
-{
+namespace Properties {
+
 // The spatial parameters TypeTag
 NEW_TYPE_TAG(TwoPTwoCComparisonSpatialParams);
 
@@ -79,7 +79,6 @@ class TwoPTwoCComparisonSpatialParams : public FVSpatialParams<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using GlobalPosition = Dune::FieldVector<Scalar, GridView::dimension>;
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
     using MaterialLawParams = typename MaterialLaw::Params;
@@ -113,11 +112,10 @@ public:
         coarseMaterialParams_.setLambda(2.0);
     }
 
-
-
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         if (isFineMaterial_(scv.dofPosition()))
             return fineK_;
@@ -133,9 +131,10 @@ public:
      * \param scvIdx      The local index of the sub-control volume where
      *                    the porosity needs to be defined
      */
+    template<class ElementSolution>
     Scalar porosity(const Element &element,
                     const SubControlVolume &scv,
-                    const ElementSolutionVector &elemSol) const
+                    const ElementSolution &elemSol) const
     {
         return porosity_;
     }
diff --git a/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh b/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh
index 52b2e7c192..f1a0f01b9d 100644
--- a/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh
+++ b/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh
@@ -24,6 +24,7 @@
 #ifndef DUMUX_FUELCELL_PROBLEM_HH
 #define DUMUX_FUELCELL_PROBLEM_HH
 
+#include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/cellcentered/tpfa/properties.hh>
 #include <dumux/discretization/box/properties.hh>
 #include <dumux/porousmediumflow/2pnc/model.hh>
@@ -33,8 +34,8 @@
 
 #include "fuelcellspatialparams.hh"
 
-namespace Dumux
-{
+namespace Dumux {
+
 /*!
  * \ingroup TwoPNCTests
  * \brief Definition of a problem for water management in PEM fuel cells.
@@ -93,7 +94,6 @@ class FuelCellProblem : public PorousMediumFlowProblem<TypeTag>
     using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     // Select the electrochemistry method
     using ElectroChemistry = typename Dumux::ElectroChemistry<TypeTag, ElectroChemistryModel::Ochs>;
 
@@ -268,7 +268,7 @@ public:
     {
         for (const auto& element : elements(this->fvGridGeometry().gridView()))
         {
-            ElementSolutionVector elemSol(element, curSol, this->fvGridGeometry());
+            auto elemSol = elementSolution(element, curSol, this->fvGridGeometry());
 
             auto fvGeometry = localView(this->fvGridGeometry());
             fvGeometry.bindElement(element);
diff --git a/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh b/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh
index 5077290455..65e79f723a 100644
--- a/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh
+++ b/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh
@@ -24,6 +24,7 @@
 #ifndef DUMUX_DISSOLUTION_PROBLEM_HH
 #define DUMUX_DISSOLUTION_PROBLEM_HH
 
+#include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/methods.hh>
 #include <dumux/discretization/cellcentered/tpfa/properties.hh>
 #include <dumux/discretization/box/properties.hh>
@@ -131,7 +132,6 @@ class DissolutionProblem : public PorousMediumFlowProblem<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
     using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
@@ -370,7 +370,7 @@ public:
         {
             for (const auto& element : elements(this->fvGridGeometry().gridView()))
             {
-                ElementSolutionVector elemSol(element, curSol, this->fvGridGeometry());
+                const auto elemSol = elementSolution(element, curSol, this->fvGridGeometry());
 
                 auto fvGeometry = localView(this->fvGridGeometry());
                 fvGeometry.bindElement(element);
diff --git a/test/porousmediumflow/2pncmin/implicit/dissolutionspatialparams.hh b/test/porousmediumflow/2pncmin/implicit/dissolutionspatialparams.hh
index 082ce837be..5ad810c656 100644
--- a/test/porousmediumflow/2pncmin/implicit/dissolutionspatialparams.hh
+++ b/test/porousmediumflow/2pncmin/implicit/dissolutionspatialparams.hh
@@ -32,14 +32,14 @@
 #include <dumux/material/fluidmatrixinteractions/porosityprecipitation.hh>
 #include <dumux/material/fluidmatrixinteractions/permeabilitykozenycarman.hh>
 
-namespace Dumux
-{
+namespace Dumux {
+
 //forward declaration
 template<class TypeTag>
 class DissolutionSpatialparams;
 
-namespace Properties
-{
+namespace Properties {
+
 // The spatial parameters TypeTag
 NEW_TYPE_TAG(DissolutionSpatialparams);
 
@@ -73,7 +73,6 @@ class DissolutionSpatialparams : public FVSpatialParams<TypeTag>
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using MaterialLawParams = typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params;
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using CoordScalar = typename GridView::ctype;
     enum { dimWorld=GridView::dimensionworld };
 
@@ -142,9 +141,10 @@ public:
      *  \param element The finite element
      *  \param scv The sub-control volume
      */
+    template<class ElementSolution>
     Scalar porosity(const Element& element,
                     const SubControlVolume& scv,
-                    const ElementSolutionVector& elemSol) const
+                    const ElementSolution& elemSol) const
     { return poroLaw_.evaluatePorosity(element, scv, elemSol); }
 
     /*!
@@ -165,9 +165,10 @@ public:
      *
      *  Solution dependent permeability function
      */
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
-                        const SubControlVolume& scv,
-                        const ElementSolutionVector& elemSol) const
+                                  const SubControlVolume& scv,
+                                  const ElementSolution& elemSol) const
     { return permLaw_.evaluatePermeability(element, scv, elemSol); }
 
     Scalar solidity(const SubControlVolume &scv) const
diff --git a/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh b/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh
index 648ee3c044..7501d43ad1 100644
--- a/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh
+++ b/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh
@@ -27,6 +27,7 @@
 
 #include <math.h>
 
+#include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/cellcentered/tpfa/properties.hh>
 #include <dumux/discretization/cellcentered/mpfa/properties.hh>
 #include <dumux/discretization/box/properties.hh>
@@ -113,7 +114,6 @@ class ThreePNIConductionProblem : public PorousMediumFlowProblem<TypeTag>
     using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
     using ThermalConductivityModel = typename GET_PROP_TYPE(TypeTag, ThermalConductivityModel);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
     using IapwsH2O = H2O<Scalar>;
     using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
@@ -157,7 +157,7 @@ public:
     {
         const auto someElement = *(elements(this->fvGridGeometry().gridView()).begin());
 
-        ElementSolutionVector someElemSol(someElement, curSol, this->fvGridGeometry());
+        const auto someElemSol = elementSolution(someElement, curSol, this->fvGridGeometry());
         const auto someInitSol = initialAtPos(someElement.geometry().center());
 
         auto fvGeometry = localView(this->fvGridGeometry());
diff --git a/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh b/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh
index 05d9674f39..239ff94903 100644
--- a/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh
+++ b/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh
@@ -27,6 +27,7 @@
 
 #include <math.h>
 
+#include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/cellcentered/tpfa/properties.hh>
 #include <dumux/discretization/cellcentered/mpfa/properties.hh>
 #include <dumux/discretization/box/properties.hh>
@@ -113,7 +114,6 @@ class ThreePNIConvectionProblem : public PorousMediumFlowProblem<TypeTag>
     using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
     using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
     using IapwsH2O = H2O<Scalar>;
@@ -166,7 +166,7 @@ public:
     {
         const auto someElement = *(elements(this->fvGridGeometry().gridView()).begin());
 
-        ElementSolutionVector someElemSol(someElement, curSol, this->fvGridGeometry());
+        const auto someElemSol = elementSolution(someElement, curSol, this->fvGridGeometry());
         const auto someInitSol = initialAtPos(someElement.geometry().center());
 
         auto fvGeometry = localView(this->fvGridGeometry());
diff --git a/test/porousmediumflow/3p/implicit/infiltration3pspatialparams.hh b/test/porousmediumflow/3p/implicit/infiltration3pspatialparams.hh
index 5695934089..ffcc3b6d00 100644
--- a/test/porousmediumflow/3p/implicit/infiltration3pspatialparams.hh
+++ b/test/porousmediumflow/3p/implicit/infiltration3pspatialparams.hh
@@ -32,8 +32,8 @@
 #include <dumux/io/gnuplotinterface.hh>
 #include <dumux/io/plotmateriallaw3p.hh>
 
-namespace Dumux
-{
+namespace Dumux {
+
 /*!
  * \ingroup ThreePTests
  * \brief Definition of the spatial parameters for the kuevette problem, which
@@ -82,7 +82,6 @@ class InfiltrationThreePSpatialParams : public FVSpatialParams<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag,ElementSolutionVector);
     enum { dimWorld=GridView::dimensionworld };
 
     using GlobalPosition = Dune::FieldVector<Scalar, GridView::dimension>;
@@ -155,9 +154,10 @@ public:
      * \param elemSol The element solution vector
      * \return the intrinsic permeability
      */
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         if (isFineMaterial_(scv.dofPosition()))
             return fineK_;
diff --git a/test/porousmediumflow/3p3c/implicit/columnxylolspatialparams.hh b/test/porousmediumflow/3p3c/implicit/columnxylolspatialparams.hh
index f9fbe3dcfd..b4dd0960a2 100644
--- a/test/porousmediumflow/3p3c/implicit/columnxylolspatialparams.hh
+++ b/test/porousmediumflow/3p3c/implicit/columnxylolspatialparams.hh
@@ -29,8 +29,8 @@
 #include <dumux/material/fluidmatrixinteractions/3p/regularizedparkervangen3pparams.hh>
 #include <dumux/material/fluidmatrixinteractions/3p/efftoabslaw.hh>
 
-namespace Dumux
-{
+namespace Dumux {
+
 /*!
  * \ingroup ThreePThreeCTests
  * \brief Definition of the spatial parameters for the column problem.
@@ -39,8 +39,8 @@ namespace Dumux
 template<class TypeTag>
 class ColumnSpatialParams;
 
-namespace Properties
-{
+namespace Properties {
+
 // The spatial parameters TypeTag
 NEW_TYPE_TAG(ColumnSpatialParams);
 
@@ -74,7 +74,6 @@ class ColumnSpatialParams : public FVSpatialParams<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using GlobalPosition = Dune::FieldVector<typename GridView::ctype, dimWorld>;
 
@@ -139,9 +138,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return permeability
      */
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         const auto& globalPos = scv.dofPosition();
         if (isFineMaterial_(globalPos))
@@ -156,9 +156,10 @@ public:
      * \param scv The sub-control volume inside the element.
      * \param elemSol The solution at the dofs connected to the element.
      */
+    template<class ElementSolution>
     Scalar porosity(const Element& element,
                     const SubControlVolume& scv,
-                    const ElementSolutionVector& elemSol) const
+                    const ElementSolution& elemSol) const
     {
         const auto& globalPos = scv.dofPosition();
         if (isFineMaterial_(globalPos))
@@ -176,9 +177,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return the material parameters object
      */
+    template<class ElementSolution>
     const MaterialLawParams& materialLawParams(const Element& element,
                                                const SubControlVolume& scv,
-                                               const ElementSolutionVector& elemSol) const
+                                               const ElementSolution& elemSol) const
     {
         const auto& globalPos = scv.dofPosition();
         if (isFineMaterial_(globalPos))
@@ -196,9 +198,10 @@ public:
      * \param scv The sub-control volume inside the element.
      * \param elemSol The solution at the dofs connected to the element.
      */
+    template<class ElementSolution>
     Scalar solidHeatCapacity(const Element& element,
                              const SubControlVolume& scv,
-                             const ElementSolutionVector& elemSol) const
+                             const ElementSolution& elemSol) const
     {
         const auto& globalPos = scv.dofPosition();
         if (isFineMaterial_(globalPos))
@@ -216,9 +219,10 @@ public:
      * \param fvGeometry The finite volume geometry
      * \param scvIdx The local index of the sub-control volume
      */
+    template<class ElementSolution>
     Scalar solidDensity(const Element &element,
                         const SubControlVolume& scv,
-                        const ElementSolutionVector& elemSol) const
+                        const ElementSolution& elemSol) const
     {
         return 2650; // density of sand [kg/m^3]
     }
@@ -231,9 +235,10 @@ public:
      * \param scvIdx The local index of the sub-control volume where
      *                    the heat capacity needs to be defined
      */
+    template<class ElementSolution>
     Scalar solidThermalConductivity(const Element &element,
                                     const SubControlVolume& scv,
-                                    const ElementSolutionVector& elemSol) const
+                                    const ElementSolution& elemSol) const
     {
         return lambdaSolid_;
     }
diff --git a/test/porousmediumflow/3p3c/implicit/infiltration3p3cspatialparams.hh b/test/porousmediumflow/3p3c/implicit/infiltration3p3cspatialparams.hh
index 8d03c0fd34..4e32fa88b1 100644
--- a/test/porousmediumflow/3p3c/implicit/infiltration3p3cspatialparams.hh
+++ b/test/porousmediumflow/3p3c/implicit/infiltration3p3cspatialparams.hh
@@ -32,8 +32,8 @@
 #include <dumux/material/fluidmatrixinteractions/3p/efftoabslaw.hh>
 #include <dumux/io/plotmateriallaw3p.hh>
 
-namespace Dumux
-{
+namespace Dumux {
+
 /*!
  * \ingroup ThreePThreeCTests
  * \brief Definition of the spatial parameters for the kuevette problem
@@ -82,7 +82,6 @@ class InfiltrationThreePThreeCSpatialParams : public FVSpatialParams<TypeTag>
     using GlobalPosition = Dune::FieldVector<typename GridView::ctype, dimWorld>;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using Element = typename GridView::template Codim<0>::Entity;
 
 public:
@@ -129,9 +128,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return permeability
      */
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         const auto& globalPos = scv.dofPosition();
         if (isFineMaterial_(globalPos))
diff --git a/test/porousmediumflow/3p3c/implicit/kuevettespatialparams.hh b/test/porousmediumflow/3p3c/implicit/kuevettespatialparams.hh
index 51866119a1..fc3fa8e845 100644
--- a/test/porousmediumflow/3p3c/implicit/kuevettespatialparams.hh
+++ b/test/porousmediumflow/3p3c/implicit/kuevettespatialparams.hh
@@ -31,8 +31,8 @@
 #include <dumux/material/fluidmatrixinteractions/3p/regularizedparkervangen3pparams.hh>
 #include <dumux/material/fluidmatrixinteractions/3p/efftoabslaw.hh>
 
-namespace Dumux
-{
+namespace Dumux {
+
 /*!
  * \ingroup ThreePThreeCTests
  * \brief Definition of the spatial parameters for the kuevette problem.
@@ -41,8 +41,8 @@ namespace Dumux
 template<class TypeTag>
 class KuevetteSpatialParams;
 
-namespace Properties
-{
+namespace Properties {
+
 // The spatial parameters TypeTag
 NEW_TYPE_TAG(KuevetteSpatialParams);
 
@@ -80,7 +80,6 @@ class KuevetteSpatialParams : public FVSpatialParams<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using GlobalPosition = Dune::FieldVector<typename GridView::ctype, dimWorld>;
 
@@ -141,9 +140,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return permeability
      */
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         const auto& globalPos = scv.dofPosition();
         if (isFineMaterial_(globalPos))
@@ -158,9 +158,10 @@ public:
      * \param scv The sub-control volume inside the element.
      * \param elemSol The solution at the dofs connected to the element.
      */
+    template<class ElementSolution>
     Scalar porosity(const Element& element,
                     const SubControlVolume& scv,
-                    const ElementSolutionVector& elemSol) const
+                    const ElementSolution& elemSol) const
     {
         const auto& globalPos = scv.dofPosition();
         if (isFineMaterial_(globalPos))
@@ -178,9 +179,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return the material parameters object
      */
+    template<class ElementSolution>
     const MaterialLawParams& materialLawParams(const Element& element,
                                                const SubControlVolume& scv,
-                                               const ElementSolutionVector& elemSol) const
+                                               const ElementSolution& elemSol) const
     {
         const auto& globalPos = scv.dofPosition();
         if (isFineMaterial_(globalPos))
@@ -212,9 +214,10 @@ public:
      * \param fvGeometry The finite volume geometry
      * \param scvIdx The local index of the sub-control volume
      */
+    template<class ElementSolution>
     Scalar solidDensity(const Element &element,
                         const SubControlVolume& scv,
-                        const ElementSolutionVector& elemSol) const
+                        const ElementSolution& elemSol) const
     {
         return 2650; // density of sand [kg/m^3]
     }
@@ -227,9 +230,10 @@ public:
      * \param scvIdx The local index of the sub-control volume where
      *                    the heat capacity needs to be defined
      */
+    template<class ElementSolution>
     Scalar solidThermalConductivity(const Element &element,
                                     const SubControlVolume& scv,
-                                    const ElementSolutionVector& elemSol) const
+                                    const ElementSolution& elemSol) const
     {
         return lambdaSolid_;
     }
diff --git a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdspatialparams.hh b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdspatialparams.hh
index acee6cb524..5884e41628 100644
--- a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdspatialparams.hh
+++ b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdspatialparams.hh
@@ -33,8 +33,8 @@
 #include <dumux/material/fluidmatrixinteractions/3p/regularizedparkervangen3pparams.hh>
 #include <dumux/material/fluidmatrixinteractions/3p/efftoabslaw.hh>
 
-namespace Dumux
-{
+namespace Dumux {
+
 /*!
  * \ingroup ThreePWaterOilTests
  * \brief Definition of the spatial parameters for the SAGD problem.
@@ -87,7 +87,6 @@ class SagdSpatialParams : public FVSpatialParams<TypeTag>
     using CoordScalar = typename Grid::ctype;
     using GlobalPosition = Dune::FieldVector<CoordScalar,dimWorld>;
     using Element = typename GridView::template Codim<0>::Entity;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
 public:
     using PermeabilityType = Scalar;
@@ -146,9 +145,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return permeability
      */
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {  return permeabilityAtPos(scv.dofPosition());}
 
     /*!
@@ -184,9 +184,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return the material parameters object
      */
+    template<class ElementSolution>
     const MaterialLawParams& materialLawParams(const Element& element,
                                                const SubControlVolume& scv,
-                                               const ElementSolutionVector& elemSol) const
+                                               const ElementSolution& elemSol) const
     {
         return materialLawParamsAtPos(scv.dofPosition());
     }
diff --git a/test/porousmediumflow/co2/implicit/heterogeneousspatialparameters.hh b/test/porousmediumflow/co2/implicit/heterogeneousspatialparameters.hh
index b8c43dfbb4..891d092475 100644
--- a/test/porousmediumflow/co2/implicit/heterogeneousspatialparameters.hh
+++ b/test/porousmediumflow/co2/implicit/heterogeneousspatialparameters.hh
@@ -33,8 +33,8 @@
 
 #include <dumux/porousmediumflow/co2/model.hh>
 
-namespace Dumux
-{
+namespace Dumux {
+
 /*!
  * \ingroup CO2Tests
  * \brief Definition of the spatial parameters for the heterogeneous
@@ -83,7 +83,6 @@ class HeterogeneousSpatialParams : public FVSpatialParams<TypeTag>
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
@@ -148,9 +147,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return instrinsic permeability
      */
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         // Get the global index of the element
         const auto eIdx = this->problem().fvGridGeometry().elementMapper().index(element);
@@ -181,9 +181,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return porosity
      */
+    template<class ElementSolution>
     Scalar porosity(const Element& element,
                     const SubControlVolume& scv,
-                    const ElementSolutionVector& elemSol) const
+                    const ElementSolution& elemSol) const
     {
         // Get the global index of the element
         const auto eIdx = this->problem().fvGridGeometry().elementMapper().index(element);
diff --git a/test/porousmediumflow/mpnc/implicit/2p2ccomparison/mpnc_comparison_spatialparams.hh b/test/porousmediumflow/mpnc/implicit/2p2ccomparison/mpnc_comparison_spatialparams.hh
index 1b1fcb737e..d23f95be5d 100644
--- a/test/porousmediumflow/mpnc/implicit/2p2ccomparison/mpnc_comparison_spatialparams.hh
+++ b/test/porousmediumflow/mpnc/implicit/2p2ccomparison/mpnc_comparison_spatialparams.hh
@@ -32,8 +32,9 @@
 #include <dumux/material/fluidmatrixinteractions/mp/2padapter.hh>
 
 #include <dumux/material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh>
-namespace Dumux
-{
+
+namespace Dumux {
+
 /*!
  * \ingroup MPNCTests
  * \brief The spatial parameters for the ObstacleProblem
@@ -42,8 +43,8 @@ namespace Dumux
 template<class TypeTag>
 class MPNCComparisonSpatialParams;
 
-namespace Properties
-{
+namespace Properties {
+
 // The spatial parameters TypeTag
 NEW_TYPE_TAG(MPNCComparisonSpatialParams);
 
@@ -81,7 +82,6 @@ class MPNCComparisonSpatialParams : public FVSpatialParams<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using GlobalPosition = Dune::FieldVector<Scalar, GridView::dimension>;
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
     using MaterialLawParams = typename MaterialLaw::Params;
@@ -115,11 +115,10 @@ public:
         coarseMaterialParams_.setLambda(2.0);
     }
 
-
-
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         if (isFineMaterial_(scv.dofPosition()))
             return fineK_;
@@ -135,9 +134,10 @@ public:
      * \param scvIdx      The local index of the sub-control volume where
      *                    the porosity needs to be defined
      */
+    template<class ElementSolution>
     Scalar porosity(const Element &element,
                     const SubControlVolume &scv,
-                    const ElementSolutionVector &elemSol) const
+                    const ElementSolution &elemSol) const
     {
         return porosity_;
     }
diff --git a/test/porousmediumflow/mpnc/implicit/combustionspatialparams.hh b/test/porousmediumflow/mpnc/implicit/combustionspatialparams.hh
index c29ba50dec..784adce694 100644
--- a/test/porousmediumflow/mpnc/implicit/combustionspatialparams.hh
+++ b/test/porousmediumflow/mpnc/implicit/combustionspatialparams.hh
@@ -32,8 +32,8 @@
 #include <dumux/material/fluidmatrixinteractions/mp/2padapter.hh>
 #include <dumux/material/spatialparams/fv.hh>
 
-namespace Dumux
-{
+namespace Dumux {
+
 /*!
  * \ingroup MPNCTests
  * \brief Spatialparameters for the combustionproblem1c. Parameters for the actual simulation domain and an outflow region are provided.
@@ -42,8 +42,7 @@ namespace Dumux
 template<class TypeTag>
 class CombustionSpatialParams;
 
-namespace Properties
-{
+namespace Properties {
 
 // The spatial params TypeTag
 NEW_TYPE_TAG(CombustionSpatialParams);
@@ -84,7 +83,6 @@ class CombustionSpatialParams : public FVSpatialParams<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
     using MaterialLawParams = typename MaterialLaw::Params;
 
@@ -128,13 +126,10 @@ public:
         materialParams_.setGamma(interfacialTension_); // interfacial tension of water-air at 100°C
     }
 
-    ~CombustionSpatialParams()
-    {}
-
-
-     PermeabilityType permeability(const Element& element,
+    template<class ElementSolution>
+    PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         const auto& globalPos =  scv.dofPosition();
         if ( inOutFlow(globalPos) )
@@ -151,9 +146,10 @@ public:
      * \param scvIdx      The local index of the sub-control volume where
      *                    the porosity needs to be defined
      */
+    template<class ElementSolution>
     Scalar porosity(const Element &element,
                     const SubControlVolume &scv,
-                    const ElementSolutionVector &elemSol) const
+                    const ElementSolution &elemSol) const
     {
         const auto& globalPos =  scv.dofPosition();
         if ( inOutFlow(globalPos) )
@@ -177,9 +173,10 @@ public:
      * \param element     The finite element
      * \param fvGeometry  The finite volume geometry
      * \param scvIdx      The local index of the sub control volume */
+    template<class ElementSolution>
     const Scalar characteristicLength(const Element & element,
                                       const SubControlVolume &scv,
-                                      const ElementSolutionVector &elemSol) const
+                                      const ElementSolution &elemSol) const
 
     {
         const auto& globalPos =  scv.center();
@@ -199,9 +196,10 @@ public:
      * \param element     The finite element
      * \param fvGeometry  The finite volume geometry
      * \param scvIdx      The local index of the sub control volume */
+    template<class ElementSolution>
     const Scalar factorEnergyTransfer(const Element &element,
                                       const SubControlVolume &scv,
-                                      const ElementSolutionVector &elemSol) const
+                                      const ElementSolution &elemSol) const
     {
        const auto& globalPos =  scv.dofPosition();
         return factorEnergyTransferAtPos(globalPos);
@@ -223,9 +221,10 @@ public:
      * \param element     The finite element
      * \param fvGeometry  The finite volume geometry
      * \param scvIdx      The local index of the sub control volume */
+    template<class ElementSolution>
     const Scalar factorMassTransfer(const Element &element,
                                     const SubControlVolume &scv,
-                                    const ElementSolutionVector &elemSol) const
+                                    const ElementSolution &elemSol) const
     {
        const auto& globalPos =  scv.dofPosition();
        return factorMassTransferAtPos(globalPos);
@@ -270,9 +269,10 @@ public:
      *
      * \param globalPos The global position
      */
+    template<class ElementSolution>
     Scalar solidThermalConductivity(const Element &element,
                                     const SubControlVolume &scv,
-                                    const ElementSolutionVector &elemSol) const
+                                    const ElementSolution &elemSol) const
     {
         const auto& globalPos =  scv.dofPosition();
         if ( inOutFlow(globalPos) )
diff --git a/test/porousmediumflow/mpnc/implicit/evaporationatmospherespatialparams.hh b/test/porousmediumflow/mpnc/implicit/evaporationatmospherespatialparams.hh
index 1047128da4..5cfb989ee3 100644
--- a/test/porousmediumflow/mpnc/implicit/evaporationatmospherespatialparams.hh
+++ b/test/porousmediumflow/mpnc/implicit/evaporationatmospherespatialparams.hh
@@ -44,8 +44,8 @@
 
 #include <dune/common/parametertreeparser.hh>
 
-namespace Dumux
-{
+namespace Dumux {
+
 /*!
  * \ingroup MPNCTests
  * \brief spatialparameters for the kinetic test-case of the mpnc model. "Poor-mans" coupling of free-flow and porous medium.
@@ -55,8 +55,8 @@ namespace Dumux
 template<class TypeTag>
 class EvaporationAtmosphereSpatialParams;
 
-namespace Properties
-{
+namespace Properties {
+
 // The spatial params TypeTag
 NEW_TYPE_TAG(EvaporationAtmosphereSpatialParams);
 
@@ -157,7 +157,6 @@ class EvaporationAtmosphereSpatialParams : public FVSpatialParams<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
     using MaterialLawParams = typename MaterialLaw::Params;
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
@@ -274,13 +273,10 @@ public:
         aNonWettingSolidSurfaceParamsFreeFlow_.setA3(0.);
     }
 
-    ~EvaporationAtmosphereSpatialParams()
-    {}
-
-
-     PermeabilityType permeability(const Element& element,
+    template<class ElementSolution>
+    PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         const  auto & globalPos =  scv.dofPosition();
         if (inFF_(globalPos) )
@@ -298,9 +294,10 @@ public:
      * \param element The finite element
      * \param fvGeometry The finite volume geometry
      * \param scvIdx The local index of the sub-control volume  */
+    template<class ElementSolution>
     Scalar porosity(const Element &element,
                     const SubControlVolume &scv,
-                    const ElementSolutionVector &elemSol) const
+                    const ElementSolution &elemSol) const
     {
         const auto& globalPos =  scv.dofPosition();
 
@@ -312,9 +309,10 @@ public:
             DUNE_THROW(Dune::InvalidStateException, "You should not be here: x=" << globalPos[0] << " y= "<< globalPos[dimWorld-1]);
     }
 
+    template<class ElementSolution>
     const MaterialLawParams& materialLawParams(const Element& element,
                                                const SubControlVolume& scv,
-                                               const ElementSolutionVector& elemSol) const
+                                               const ElementSolution& elemSol) const
     {
         const auto& globalPos =  scv.dofPosition();
         if (inFF_(globalPos) )
@@ -344,9 +342,10 @@ public:
      * \param element     The finite element
      * \param fvGeometry  The finite volume geometry
      * \param scvIdx      The local index of the sub-control volume */
+    template<class ElementSolution>
     const AwnSurfaceParams & aWettingNonWettingSurfaceParams(const Element &element,
                                                              const SubControlVolume &scv,
-                                                             const ElementSolutionVector &elemSol) const
+                                                             const ElementSolution &elemSol) const
     {
         const auto& globalPos =  scv.dofPosition();
         if (inFF_(globalPos) )
@@ -364,9 +363,10 @@ public:
      * \param element     The finite element
      * \param fvGeometry  The finite volume geometry
      * \param scvIdx      The local index of the sub-control volume */
+    template<class ElementSolution>
     const AnsSurfaceParams & aNonWettingSolidSurfaceParams(const Element &element,
                                                              const SubControlVolume &scv,
-                                                             const ElementSolutionVector &elemSol) const
+                                                             const ElementSolution &elemSol) const
     {
         const auto& globalPos =  scv.dofPosition();
         if (inFF_(globalPos) )
@@ -388,9 +388,10 @@ public:
      * \param element     The finite element
      * \param fvGeometry  The finite volume geometry
      * \param scvIdx      The local index of the sub-control volume */
+    template<class ElementSolution>
     const Scalar pcMax(const Element &element,
                        const SubControlVolume &scv,
-                       const ElementSolutionVector &elemSol) const
+                       const ElementSolution &elemSol) const
     { return aWettingNonWettingSurfaceParams_.pcMax() ; }
 
 
@@ -401,9 +402,10 @@ public:
      * \param element     The finite element
      * \param fvGeometry  The finite volume geometry
      * \param scvIdx      The local index of the sub control volume */
+    template<class ElementSolution>
     const Scalar characteristicLength(const Element & element,
                                       const SubControlVolume &scv,
-                                      const ElementSolutionVector &elemSol) const
+                                      const ElementSolution &elemSol) const
 
     {
         const auto& globalPos =  scv.dofPosition();
@@ -428,9 +430,10 @@ public:
      * \param element     The finite element
      * \param fvGeometry  The finite volume geometry
      * \param scvIdx      The local index of the sub control volume */
+    template<class ElementSolution>
     const Scalar factorEnergyTransfer(const Element &element,
                                       const SubControlVolume &scv,
-                                      const ElementSolutionVector &elemSol) const
+                                      const ElementSolution &elemSol) const
     {
        const auto& globalPos =  scv.dofPosition();
        return factorEnergyTransferAtPos(globalPos);
@@ -454,9 +457,10 @@ public:
      * \param element     The finite element
      * \param fvGeometry  The finite volume geometry
      * \param scvIdx      The local index of the sub control volume */
+    template<class ElementSolution>
     const Scalar factorMassTransfer(const Element &element,
                                       const SubControlVolume &scv,
-                                      const ElementSolutionVector &elemSol) const
+                                      const ElementSolution &elemSol) const
     {
        const auto& globalPos =  scv.dofPosition();
         return factorMassTransferAtPos(globalPos);
diff --git a/test/porousmediumflow/mpnc/implicit/obstaclespatialparams.hh b/test/porousmediumflow/mpnc/implicit/obstaclespatialparams.hh
index 7e76fb9a21..7cdb5b6e26 100644
--- a/test/porousmediumflow/mpnc/implicit/obstaclespatialparams.hh
+++ b/test/porousmediumflow/mpnc/implicit/obstaclespatialparams.hh
@@ -32,8 +32,8 @@
 #include <dumux/material/fluidmatrixinteractions/mp/mplinearmaterial.hh>
 #include <dumux/material/fluidmatrixinteractions/mp/2padapter.hh>
 
-namespace Dumux
-{
+namespace Dumux {
+
 /*!
  * \ingroup MPNCTests
  * \brief The spatial parameters for the ObstacleProblem
@@ -81,7 +81,6 @@ class ObstacleSpatialParams : public FVSpatialParams<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
     using MaterialLawParams = typename MaterialLaw::Params;
 
@@ -119,9 +118,10 @@ public:
     ~ObstacleSpatialParams()
     {}
 
+    template<class ElementSolution>
     PermeabilityType permeability(const Element& element,
                                   const SubControlVolume& scv,
-                                  const ElementSolutionVector& elemSol) const
+                                  const ElementSolution& elemSol) const
     {
         if (isFineMaterial_(scv.dofPosition()))
             return fineK_;
@@ -137,9 +137,10 @@ public:
      * \param scvIdx      The local index of the sub-control volume where
      *                    the porosity needs to be defined
      */
+    template<class ElementSolution>
     Scalar porosity(const Element &element,
                     const SubControlVolume &scv,
-                    const ElementSolutionVector &elemSol) const
+                    const ElementSolution &elemSol) const
     {
         return porosity_;
     }
diff --git a/test/porousmediumflow/mpnc/implicit/plotoverline2d.hh b/test/porousmediumflow/mpnc/implicit/plotoverline2d.hh
index 88f3fbcc53..1db898201b 100644
--- a/test/porousmediumflow/mpnc/implicit/plotoverline2d.hh
+++ b/test/porousmediumflow/mpnc/implicit/plotoverline2d.hh
@@ -45,7 +45,7 @@ namespace Properties
     NEW_PROP_TAG(GridView);
     NEW_PROP_TAG(DofMapper);
     NEW_PROP_TAG(FluidSystem);
-    NEW_PROP_TAG(ElementSolutionVector);
+    NEW_PROP_TAG(ElementSolution);
     NEW_PROP_TAG(SolutionVector);
     NEW_PROP_TAG(FVElementGeometry);
     NEW_PROP_TAG(TwoPIAIndices);
@@ -65,7 +65,6 @@ class PlotOverLine2D
 
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using DofMapper = typename GET_PROP_TYPE(TypeTag, DofMapper);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
     using aterialLawParams = typename MaterialLaw::Params;
diff --git a/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh b/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh
index eb57f3ba57..4bc62d8087 100644
--- a/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh
+++ b/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh
@@ -27,6 +27,7 @@
 
 #include <math.h>
 
+#include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/cellcentered/tpfa/properties.hh>
 #include <dumux/discretization/box/properties.hh>
 
@@ -104,7 +105,6 @@ class RichardsNIConductionProblem :public PorousMediumFlowProblem<TypeTag>
     using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
     using ThermalConductivityModel = typename GET_PROP_TYPE(TypeTag, ThermalConductivityModel);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
     using IapwsH2O = H2O<Scalar>;
 
@@ -150,7 +150,7 @@ public:
     {
         const auto someElement = *(elements(this->fvGridGeometry().gridView()).begin());
 
-        ElementSolutionVector someElemSol(someElement, curSol, this->fvGridGeometry());
+        const auto someElemSol = elementSolution(someElement, curSol, this->fvGridGeometry());
         const auto someInitSol = initialAtPos(someElement.geometry().center());
 
         auto fvGeometry = localView(this->fvGridGeometry());
diff --git a/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh b/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh
index 578786b9bf..ecf909b6e1 100644
--- a/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh
+++ b/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh
@@ -28,6 +28,7 @@
 
 #include <math.h>
 
+#include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/cellcentered/tpfa/properties.hh>
 #include <dumux/discretization/box/properties.hh>
 
@@ -111,7 +112,6 @@ class RichardsNIConvectionProblem : public PorousMediumFlowProblem<TypeTag>
     using ThermalConductivityModel = typename GET_PROP_TYPE(TypeTag, ThermalConductivityModel);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
     using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
     using IapwsH2O = H2O<Scalar>;
@@ -164,7 +164,7 @@ public:
     {
         const auto someElement = *(elements(this->fvGridGeometry().gridView()).begin());
 
-        ElementSolutionVector someElemSol(someElement, curSol, this->fvGridGeometry());
+        const auto someElemSol = elementSolution(someElement, curSol, this->fvGridGeometry());
         const auto someInitSol = initialAtPos(someElement.geometry().center());
 
         auto fvGeometry = localView(this->fvGridGeometry());
diff --git a/test/porousmediumflow/tracer/1ptracer/1ptestspatialparams.hh b/test/porousmediumflow/tracer/1ptracer/1ptestspatialparams.hh
index eb8768eed1..ae7e2a95a1 100644
--- a/test/porousmediumflow/tracer/1ptracer/1ptestspatialparams.hh
+++ b/test/porousmediumflow/tracer/1ptracer/1ptestspatialparams.hh
@@ -27,8 +27,8 @@
 #include <random>
 #include <dumux/material/spatialparams/fv1p.hh>
 
-namespace Dumux
-{
+namespace Dumux {
+
 /*!
  * \ingroup TracerTests
  * \brief The spatial params the incompressible test
@@ -43,7 +43,6 @@ class OnePTestSpatialParams : public FVSpatialParamsOneP<TypeTag>
     using Element = typename GridView::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     static constexpr int dimWorld = GridView::dimensionworld;
     using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
@@ -79,9 +78,10 @@ public:
      * \param elemSol The element solution vector
      * \return the intrinsic permeability
      */
+    template<class ElementSolution>
     const PermeabilityType& permeability(const Element& element,
                                          const SubControlVolume& scv,
-                                         const ElementSolutionVector& elemSol) const
+                                         const ElementSolution& elemSol) const
     {
         return K_[scv.dofIndex()];
 
@@ -100,9 +100,10 @@ public:
      * \param elemSol The solution at the dofs connected to the element.
      * \return the porosity
      */
+    template<class ElementSolution>
     Scalar porosity(const Element &element,
                         const SubControlVolume &scv,
-                        const ElementSolutionVector &elemSol) const
+                        const ElementSolution &elemSol) const
     { return 0.2; }
 
     //! Reference to the k field
diff --git a/test/porousmediumflow/tracer/1ptracer/tracertestspatialparams.hh b/test/porousmediumflow/tracer/1ptracer/tracertestspatialparams.hh
index aa5bbc540f..eb7e62a30f 100644
--- a/test/porousmediumflow/tracer/1ptracer/tracertestspatialparams.hh
+++ b/test/porousmediumflow/tracer/1ptracer/tracertestspatialparams.hh
@@ -26,8 +26,8 @@
 
 #include <dumux/material/spatialparams/fv1p.hh>
 
-namespace Dumux
-{
+namespace Dumux {
+
 /*!
  * \ingroup TracerTests
  * \brief Definition of the spatial parameters for the tracer problem
@@ -44,7 +44,6 @@ class TracerTestSpatialParams : public FVSpatialParamsOneP<TypeTag>
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
     using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     static const int dimWorld = GridView::dimensionworld;
     using GlobalPosition = typename Dune::FieldVector<Scalar, dimWorld>;
@@ -69,9 +68,10 @@ public:
      * \param scv The sub-control volume
      * \param elemSol The solution for all dofs of the element
      */
+    template<class ElementSolution>
     Scalar dispersivity(const Element &element,
                         const SubControlVolume& scv,
-                        const ElementSolutionVector& elemSol) const
+                        const ElementSolution& elemSol) const
     { return 0; }
 
     //! Fluid properties that are spatial params in the tracer model
diff --git a/test/porousmediumflow/tracer/constvel/tracertestspatialparams.hh b/test/porousmediumflow/tracer/constvel/tracertestspatialparams.hh
index 152f05181a..b91d384265 100644
--- a/test/porousmediumflow/tracer/constvel/tracertestspatialparams.hh
+++ b/test/porousmediumflow/tracer/constvel/tracertestspatialparams.hh
@@ -26,8 +26,7 @@
 
 #include <dumux/material/spatialparams/fv1p.hh>
 
-namespace Dumux
-{
+namespace Dumux {
 
 /*!
  * \ingroup TracerTests
@@ -45,7 +44,6 @@ class TracerTestSpatialParams : public FVSpatialParamsOneP<TypeTag>
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
     using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     static const int dimWorld = GridView::dimensionworld;
     using GlobalPosition = typename Dune::FieldVector<Scalar, dimWorld>;
@@ -70,9 +68,10 @@ public:
      * \param scv The sub-control volume
      * \param elemSol The solution for all dofs of the element
      */
+    template<class ElementSolution>
     Scalar dispersivity(const Element &element,
                         const SubControlVolume& scv,
-                        const ElementSolutionVector& elemSol) const
+                        const ElementSolution& elemSol) const
     { return 0; }
 
     //! Fluid properties that are spatial params in the tracer model
diff --git a/test/porousmediumflow/tracer/multicomp/maxwellstefantestproblem.hh b/test/porousmediumflow/tracer/multicomp/maxwellstefantestproblem.hh
index 5ad843104d..716e02474f 100644
--- a/test/porousmediumflow/tracer/multicomp/maxwellstefantestproblem.hh
+++ b/test/porousmediumflow/tracer/multicomp/maxwellstefantestproblem.hh
@@ -25,6 +25,7 @@
 #ifndef DUMUX_MAXWELL_STEFAN_TEST_PROBLEM_HH
 #define DUMUX_MAXWELL_STEFAN_TEST_PROBLEM_HH
 
+#include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/box/properties.hh>
 #include <dumux/discretization/cellcentered/tpfa/properties.hh>
 
@@ -187,7 +188,6 @@ class MaxwellStefanTestProblem : public PorousMediumFlowProblem<TypeTag>
     using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     //! property that defines whether mole or mass fractions are used
     static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
@@ -242,7 +242,7 @@ public:
                     auto fvGeometry = localView(this->fvGridGeometry());
                     fvGeometry.bindElement(element);
 
-                    ElementSolutionVector elemSol(element, curSol, this->fvGridGeometry());
+                    const auto elemSol = elementSolution(element, curSol, this->fvGridGeometry());
                     for (auto&& scv : scvs(fvGeometry))
                     {
                         const auto& globalPos = scv.dofPosition();
diff --git a/test/porousmediumflow/tracer/multicomp/maxwellstefantestspatialparams.hh b/test/porousmediumflow/tracer/multicomp/maxwellstefantestspatialparams.hh
index c1fd92a454..9b916850cd 100644
--- a/test/porousmediumflow/tracer/multicomp/maxwellstefantestspatialparams.hh
+++ b/test/porousmediumflow/tracer/multicomp/maxwellstefantestspatialparams.hh
@@ -26,8 +26,7 @@
 
 #include <dumux/material/spatialparams/fv1p.hh>
 
-namespace Dumux
-{
+namespace Dumux {
 
 /*!
  * \ingroup TracerTest
@@ -45,7 +44,6 @@ class MaxwellStefanTestSpatialParams : public FVSpatialParamsOneP<TypeTag>
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
     using SubControlVolume = typename FVElementGeometry::SubControlVolume;
     using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
-    using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     static const int dimWorld = GridView::dimensionworld;
     using GlobalPosition = typename Dune::FieldVector<Scalar, dimWorld>;
@@ -70,9 +68,10 @@ public:
      * \param scv The sub-control volume
      * \param elemSol The solution for all dofs of the element
      */
+    template<class ElementSolution>
     Scalar dispersivity(const Element &element,
                         const SubControlVolume& scv,
-                        const ElementSolutionVector& elemSol) const
+                        const ElementSolution& elemSol) const
     { return 0; }
 
     //! Fluid properties that are spatial params in the tracer model
-- 
GitLab