Commit 517c5a39 authored by Lukas Riedel's avatar Lukas Riedel

Use typedef for scalar values in WaterFluxAdapter

parent 194d9449
......@@ -55,19 +55,20 @@ namespace Dune{
const typename Traits::DomainType& x,
typename Traits::RangeType& y) const
{
_dgf_h_grad.evaluate(e,x,y);
using Scalar = typename DiscreteGridFunction::Traits::RangeType;
_dgf_h_grad.evaluate(e,x,y);
y -= _p->gravity();
typename DiscreteGridFunction::Traits::RangeType u;
Scalar u;
_dgf_h.evaluate(e,x,u);
const typename Traits::DomainType xGlobal = e.geometry().global(x);
const typename DiscreteGridFunction::Traits::RangeType head = _p->headMillerToRef(u, xGlobal);
const typename DiscreteGridFunction::Traits::RangeType sat = _p->saturation(head, xGlobal);
const typename DiscreteGridFunction::Traits::RangeType relCond = _p->condFactor(sat, xGlobal);
const typename DiscreteGridFunction::Traits::RangeType satCond = _p->condRefToMiller(_p->K(xGlobal), xGlobal);
const typename DiscreteGridFunction::Traits::RangeType cond = relCond * satCond;
const Scalar head = _p->headMillerToRef(u, xGlobal);
const Scalar sat = _p->saturation(head, xGlobal);
const Scalar relCond = _p->condFactor(sat, xGlobal);
const Scalar satCond = _p->condRefToMiller(_p->K(xGlobal), xGlobal);
const Scalar cond = relCond * satCond;
y *= -cond;
}
......
Markdown is supported
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