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

Cleanup

parent 0e0b6830
Branches
No related tags found
No related merge requests found
...@@ -425,24 +425,26 @@ int main(int argc, char *argv[]) { ...@@ -425,24 +425,26 @@ int main(int argc, char *argv[]) {
solver_tolerance, &energyNorm, verbosity); solver_tolerance, &energyNorm, verbosity);
overallSolver.solve(); overallSolver.solve();
if (parset.get<bool>("state.enable")) { if (!parset.get<bool>("state.enable"))
for (size_t i = 0; i < frictionalNodes.size(); ++i) continue;
if (frictionalNodes[i][0]) {
double const L = 1e-4; // FIXME: magic value for (size_t i = 0; i < frictionalNodes.size(); ++i) {
double const unorm = u4_diff[i].two_norm(); if (frictionalNodes[i][0]) {
double const L = 1e-4; // FIXME: magic value
double ret1 = double const unorm = u4_diff[i].two_norm();
compute_state_update_bisection(h, unorm, L, s4_old[i][0]);
assert(abs(1.0 / h * ret1 - (s4_old[i] - unorm / L) / h - double ret1 =
exp(-ret1)) < 1e-12); compute_state_update_bisection(h, unorm, L, s4_old[i][0]);
double ret2 = assert(abs(1.0 / h * ret1 - (s4_old[i] - unorm / L) / h -
compute_state_update_lambert(h, unorm, L, s4_old[i][0]); exp(-ret1)) < 1e-12);
assert(abs(1.0 / h * ret2 - (s4_old[i] - unorm / L) / h - double ret2 =
exp(-ret2)) < 1e-12); compute_state_update_lambert(h, unorm, L, s4_old[i][0]);
assert(abs(ret2 - ret1) < 1e-14); assert(abs(1.0 / h * ret2 - (s4_old[i] - unorm / L) / h -
exp(-ret2)) < 1e-12);
(*s4_new)[i][0] = ret1; assert(abs(ret2 - ret1) < 1e-14);
}
(*s4_new)[i][0] = ret1;
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment