Skip to content
Snippets Groups Projects
Commit a5e1e6b2 authored by Elias Pipping's avatar Elias Pipping
Browse files

[Noise] Do not store logrest

parent 310490fb
No related branches found
No related tags found
No related merge requests found
......@@ -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;
};
......
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