From dfad4e97c4abc32b84d59dfd9afb2f9d3d35c1ac Mon Sep 17 00:00:00 2001
From: Katharina Heck <katharina.heck@iws.uni-stuttgart.de>
Date: Tue, 8 Oct 2019 09:42:23 +0200
Subject: [PATCH] [tests][shallowater] use new neumann interface and fix
 warning for frictionlaw in spatialparams

---
 test/freeflow/shallowwater/roughchannel/problem.hh       | 3 +++
 test/freeflow/shallowwater/roughchannel/spatialparams.hh | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/freeflow/shallowwater/roughchannel/problem.hh b/test/freeflow/shallowwater/roughchannel/problem.hh
index 3289d29830..0f4454d6d9 100644
--- a/test/freeflow/shallowwater/roughchannel/problem.hh
+++ b/test/freeflow/shallowwater/roughchannel/problem.hh
@@ -119,6 +119,8 @@ class RoughChannelProblem : public ShallowWaterProblem<TypeTag>
     using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
     using NeumannFluxes = GetPropType<TypeTag, Properties::NumEqVector>;
     using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
+    using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
+    using ElementFluxVariablesCache = typename GridVariables::GridFluxVariablesCache::LocalView;
     using VolumeVariables = typename ElementVolumeVariables::VolumeVariables;
     using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView;
     using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
@@ -287,6 +289,7 @@ public:
     NeumannFluxes neumann(const Element& element,
                           const FVElementGeometry& fvGeometry,
                           const ElementVolumeVariables& elemVolVars,
+                          const ElementFluxVariablesCache& elemFluxVarsCache,
                           const SubControlVolumeFace& scvf) const
     {
         NeumannFluxes values(0.0);
diff --git a/test/freeflow/shallowwater/roughchannel/spatialparams.hh b/test/freeflow/shallowwater/roughchannel/spatialparams.hh
index 4bafe5fa13..87bea05d50 100644
--- a/test/freeflow/shallowwater/roughchannel/spatialparams.hh
+++ b/test/freeflow/shallowwater/roughchannel/spatialparams.hh
@@ -70,7 +70,7 @@ public:
           Scalar manningN = getParam<Scalar>("Problem.ManningN");
           frictionLaw_ = std::make_unique<FrictionLawManning<VolumeVariables>>(gravity_, manningN);
       }
-      if (frictionLawType_ == "Nikuradse")
+      else if (frictionLawType_ == "Nikuradse")
       {
           Scalar ks = getParam<Scalar>("Problem.Ks"); // equivalent sand roughness
           frictionLaw_ = std::make_unique<FrictionLawNikuradse<VolumeVariables>>(ks);
-- 
GitLab