diff --git a/dune/tectonic/nicefunction.hh b/dune/tectonic/nicefunction.hh index 93234e1d8f668f58e4c01d565d57180e6bacddf7..aea4dbd79b39202e3f3b9065f791089bfc69fa76 100644 --- a/dune/tectonic/nicefunction.hh +++ b/dune/tectonic/nicefunction.hh @@ -37,7 +37,7 @@ class RuinaFunction : public NiceFunction { mu(mu), eta(eta), normalStress(normalStress), - compound_state(b * (state - log(eta * L))), + compound_state(b * (state - std::log(eta * L))), h(h), rho(exp(-(mu + compound_state) / a)) {} @@ -58,10 +58,10 @@ class RuinaFunction : public NiceFunction { void virtual evaluate(double const &x, double &y) const { double const arg = eta * x / h; if (arg <= rho) { - y = -log(rho); // TODO: We can write this out explicitly + y = -std::log(rho); // TODO: We can write this out explicitly return; } - y = arg * (log(arg) - 1) - arg * log(rho) + rho - log(rho); + y = arg * (std::log(arg) - 1) - arg * std::log(rho) + rho - std::log(rho); y *= coefficient * h * normalStress / eta; } @@ -210,25 +210,26 @@ class HorribleFunctionLogarithmic : public NiceFunction { y = 0; size_t const fl = floor(x); for (size_t i = 1; i <= fl;) - y += log(++i); // factorials grow to fast so we compute this incrementally + y += std::log( + ++i); // factorials grow to fast so we compute this incrementally - y += log(fl + 2) * (x - fl); + y += std::log(fl + 2) * (x - fl); } double virtual leftDifferential(double x) const { double const fl = floor(x); if (x - fl < 1e-14) - return log(fl + 1); + return std::log(fl + 1); else - return log(fl + 2); + return std::log(fl + 2); } double virtual rightDifferential(double x) const { double const c = ceil(x); if (c - x < 1e-14) - return log(c + 2); + return std::log(c + 2); else - return log(c + 1); + return std::log(c + 1); } }; }