Commit d19f374c authored by Martin Utz's avatar Martin Utz
Browse files

[swe][frictionlaws] Remove template parameter Scalar

parent 985dae8c
......@@ -35,9 +35,10 @@ namespace Dumux {
* The LET mobility model is used to limit the friction for small water depths.
*/
template <typename Scalar, typename VolumeVariables >
template <typename VolumeVariables >
class FrictionLaw
{
using Scalar = typename VolumeVariables::PrimaryVariables::value_type;
public:
/*!
* \brief Compute the shear stress.
......
......@@ -36,9 +36,10 @@ namespace Dumux {
* The LET mobility model is used to limit the friction for small water depths.
*/
template <typename Scalar, typename VolumeVariables>
class FrictionLawManning : public FrictionLaw<Scalar, VolumeVariables>
template <typename VolumeVariables>
class FrictionLawManning : public FrictionLaw<VolumeVariables>
{
using Scalar = typename VolumeVariables::PrimaryVariables::value_type;
public:
/*!
* \brief Constructor
......
......@@ -36,9 +36,10 @@ namespace Dumux {
* The LET mobility model is used to limit the friction for small water depths.
*/
template <typename Scalar, typename VolumeVariables>
class FrictionLawNikuradse : public FrictionLaw<Scalar, VolumeVariables>
template <typename VolumeVariables>
class FrictionLawNikuradse : public FrictionLaw<VolumeVariables>
{
using Scalar = typename VolumeVariables::PrimaryVariables::value_type;
public:
/*!
* \brief Constructor
......
......@@ -32,9 +32,6 @@
#include <dumux/freeflow/shallowwater/model.hh>
#include <dumux/freeflow/shallowwater/problem.hh>
#include <dumux/freeflow/shallowwater/boundaryfluxes.hh>
#include <dumux/material/fluidmatrixinteractions/frictionlaws/frictionlaw.hh>
#include <dumux/material/fluidmatrixinteractions/frictionlaws/manning.hh>
#include <dumux/material/fluidmatrixinteractions/frictionlaws/nikuradse.hh>
namespace Dumux {
......
......@@ -68,11 +68,11 @@ public:
{
if (frictionLawType_ == "Manning")
{
frictionLaw_ = std::make_unique<FrictionLawManning<Scalar, VolumeVariables>>(gravity_, frictionValue_);
frictionLaw_ = std::make_unique<FrictionLawManning<VolumeVariables>>(gravity_, frictionValue_);
}
if (frictionLawType_ == "Nikuradse")
{
frictionLaw_ = std::make_unique<FrictionLawNikuradse<Scalar, VolumeVariables>>(frictionValue_);
frictionLaw_ = std::make_unique<FrictionLawNikuradse<VolumeVariables>>(frictionValue_);
}
else
{
......@@ -134,7 +134,7 @@ public:
* \return frictionLaw
*/
const FrictionLaw<Scalar, VolumeVariables>& frictionLaw(const Element element) const
const FrictionLaw<VolumeVariables>& frictionLaw(const Element element) const
{
return *frictionLaw_;
}
......@@ -158,7 +158,7 @@ private:
Scalar bedSlope_;
Scalar frictionValue_;
std::string frictionLawType_;
std::unique_ptr<FrictionLaw<Scalar, VolumeVariables>> frictionLaw_;
std::unique_ptr<FrictionLaw<VolumeVariables>> frictionLaw_;
};
} // end namespace Dumux
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment