Skip to content
Snippets Groups Projects
Commit 1959a01e authored by Martin Utz's avatar Martin Utz
Browse files

[swe][frictionlaws] Rename FrictionLaw.computeShearStress

to shearStress. Also in problem.hh computeBottomFrictionSource is
renamed to bottomFricitonSource.
parent d37885ab
No related branches found
No related tags found
1 merge request!1596[shallow water] Add friction laws (Manning and Nikuradse)
......@@ -49,7 +49,7 @@ public:
* \return shear stress [N/m^2]. First entry is the x-component, the second the y-component.
*/
virtual Dune::FieldVector<Scalar, 2> computeShearStress(const VolumeVariables& VolVar) const = 0;
virtual Dune::FieldVector<Scalar, 2> shearStress(const VolumeVariables& VolVar) const = 0;
/*!
* \brief Limit the friction for small water depth.
......
......@@ -60,7 +60,7 @@ public:
*
* \return shear stress [N/m^2]. First entry is the x-component, the second the y-component.
*/
Dune::FieldVector<Scalar, 2> computeShearStress(const VolumeVariables& volVars) const final
Dune::FieldVector<Scalar, 2> shearStress(const VolumeVariables& volVars) const final
{
using std::pow;
using std::hypot;
......
......@@ -59,7 +59,7 @@ public:
*
* \return shear stress [N/m^2]. First entry is the x-component, the second the y-component.
*/
Dune::FieldVector<Scalar, 2> computeShearStress(const VolumeVariables& volVars) const final
Dune::FieldVector<Scalar, 2> shearStress(const VolumeVariables& volVars) const final
{
using std::pow;
using std::log;
......
......@@ -222,8 +222,8 @@ public:
const auto& volVars = elemVolVars[scv];
NumEqVector source (0.0);
Dune::FieldVector<Scalar, 2> bottomShearStress = this->spatialParams().frictionLaw(element)->computeShearStress(volVars);
source += computeBottomFrictionSource(bottomShearStress);
Dune::FieldVector<Scalar, 2> bottomShearStress = this->spatialParams().frictionLaw(element)->shearStress(volVars);
source += bottomFrictionSource(bottomShearStress);
return source;
}
......@@ -235,7 +235,7 @@ public:
*
* \return source
*/
NumEqVector computeBottomFrictionSource(const Dune::FieldVector<Scalar, 2> bottomShearStress) const
NumEqVector bottomFrictionSource(const Dune::FieldVector<Scalar, 2> bottomShearStress) const
{
NumEqVector bottomFrictionSource(0.0);
......
......@@ -84,7 +84,7 @@ public:
}
else
{
std::cout<<"The FrictionLaw in params.input is unknown. Valid entries are 'Manning' and 'Nikuradse'!";
std::cout<<"The FrictionLaw in params.input is unknown. Valid entries are 'Manning' and 'Nikuradse'!"<<std::endl;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment