diff --git a/dune/tectonic/frictionpotential.hh b/dune/tectonic/frictionpotential.hh index 909ccd5ec22229099873e891b55ed736ca5869ca..6d2c0154db7226136e34cb8bb5ffbb5609d33c05 100644 --- a/dune/tectonic/frictionpotential.hh +++ b/dune/tectonic/frictionpotential.hh @@ -37,7 +37,7 @@ class FrictionPotential : public FrictionPotentialWrapper { if (V <= Vmin) return 0.0; - return fd.a * (std::log(V) - logVmin); + return fd.a * (std::log(V / fd.V0) + logrest); } double differential(double V) const { @@ -61,17 +61,15 @@ class FrictionPotential : public FrictionPotentialWrapper { } void updateLogState(double logState) { - double const tmp = - (fd.mu0 + fd.b * (logState + std::log(fd.V0 / fd.L))) / fd.a; - logVmin = std::log(fd.V0) - tmp; - Vmin = fd.V0 / std::exp(tmp); + logrest = (fd.mu0 + fd.b * (logState + std::log(fd.V0 / fd.L))) / fd.a; + Vmin = fd.V0 / std::exp(logrest); } private: FrictionData const fd; double const weight; double const normalStress; - double logVmin; + double logrest; double Vmin; };