diff --git a/dune/tectonic/frictionpotential.hh b/dune/tectonic/frictionpotential.hh index 59e7ec53aecc5fd23b96ed22ec46a2a598721cc4..a806aa380491159421c8f284cc21e8d4122ec954 100644 --- a/dune/tectonic/frictionpotential.hh +++ b/dune/tectonic/frictionpotential.hh @@ -33,11 +33,10 @@ class FrictionPotential : public FrictionPotentialWrapper { : fd(_fd), weight(coefficient), normalStress(_normalStress) {} double coefficientOfFriction(double V) const { - assert(V >= 0.0); if (V <= Vmin) return 0.0; - return fd.a * (std::log(V / fd.V0) + logrest); + return fd.a * std::log(V / Vmin); } double differential(double V) const { @@ -45,7 +44,6 @@ class FrictionPotential : public FrictionPotentialWrapper { } double second_deriv(double V) const { - assert(V >= 0); if (V <= Vmin) return 0; @@ -53,7 +51,6 @@ class FrictionPotential : public FrictionPotentialWrapper { } double regularity(double V) const { - assert(V >= 0); if (std::abs(V - Vmin) < 1e-14) // TODO return std::numeric_limits<double>::infinity(); @@ -61,7 +58,7 @@ class FrictionPotential : public FrictionPotentialWrapper { } void updateAlpha(double alpha) { - logrest = (fd.mu0 + fd.b * alpha) / fd.a; + double const logrest = (fd.mu0 + fd.b * alpha) / fd.a; Vmin = fd.V0 / std::exp(logrest); } @@ -69,7 +66,6 @@ class FrictionPotential : public FrictionPotentialWrapper { FrictionData const fd; double const weight; double const normalStress; - double logrest; double Vmin; };