From e5e03f6f0d47ee506dab58690cfdf56060dee212 Mon Sep 17 00:00:00 2001
From: Martin Utz <martin.utz@baw.de>
Date: Sat, 2 Oct 2021 11:01:06 +0000
Subject: [PATCH] Remove template argument PrimaryVariables from
 ShallowWaterViscousFlux

---
 CHANGELOG.md                          | 1 +
 dumux/flux/shallowwaterviscousflux.hh | 5 ++---
 dumux/freeflow/shallowwater/model.hh  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4e2462139a..e64eddb1ae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -47,6 +47,7 @@ for (const auto& element : elements(gridGeometry.gridView()))
 - `PengRobinsonMixture::computeMolarVolumes` has been removed without deprecation. It was used nowhere and did not translate.
 - __Coupling managers__: The coupling managers now store shared_ptrs of the subdomain solutions to be able to manage memory outside. There is compatibility interface that is deprecated but it won't allow for assignments
   of the form `this->curSol() = sol;` since curSol returns a MultiTypeVector of references. If assignment is needed for some reason, use a hybrid loop over all subdomain indices.
+- __ShallowWaterViscousFlux__: The template argument `PrimaryVariables` has been removed without deprecation. It was not needed.
 
 ### Deprecated properties/classes/functions/files, to be removed after 3.5:
 
diff --git a/dumux/flux/shallowwaterviscousflux.hh b/dumux/flux/shallowwaterviscousflux.hh
index 7b3f10faff..d9f75b2532 100644
--- a/dumux/flux/shallowwaterviscousflux.hh
+++ b/dumux/flux/shallowwaterviscousflux.hh
@@ -57,8 +57,7 @@ static constexpr bool implementsFrictionLaw()
  *        by adding all surrounding shear stresses.
  *        For now implemented strictly for 2D depth-averaged models (i.e. 3 equations)
  */
-template<class PrimaryVariables, class NumEqVector,
-         typename std::enable_if_t<NumEqVector::size() == 3, int> = 0>
+template<class NumEqVector, typename std::enable_if_t<NumEqVector::size() == 3, int> = 0>
 class ShallowWaterViscousFlux
 {
 
@@ -87,7 +86,7 @@ public:
                             const ElementVolumeVariables& elemVolVars,
                             const typename FVElementGeometry::SubControlVolumeFace& scvf)
     {
-        using Scalar = typename PrimaryVariables::value_type;
+        using Scalar = typename NumEqVector::value_type;
 
         NumEqVector localFlux(0.0);
 
diff --git a/dumux/freeflow/shallowwater/model.hh b/dumux/freeflow/shallowwater/model.hh
index 4932bc4c94..12de3eacf7 100644
--- a/dumux/freeflow/shallowwater/model.hh
+++ b/dumux/freeflow/shallowwater/model.hh
@@ -161,7 +161,7 @@ struct AdvectionType<TypeTag, TTag::ShallowWater>
 
 template<class TypeTag>
 struct ViscousFluxType<TypeTag, TTag::ShallowWater>
-{ using type = ShallowWaterViscousFlux< GetPropType<TypeTag, Properties::PrimaryVariables>, Dumux::NumEqVector<GetPropType<TypeTag, Properties::PrimaryVariables>> >; };
+{ using type = ShallowWaterViscousFlux< Dumux::NumEqVector<GetPropType<TypeTag, Properties::PrimaryVariables>> >; };
 
 } // end properties
 } // end namespace Dumux
-- 
GitLab