diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 0e8cb785a03321d7bcafa4ca60ed20a8899e20ff..678a7c8e300e42cc9f8d7ebf352c38cb6ef45b24 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -373,11 +373,8 @@ int main(int argc, char *argv[]) { iterationCounter = velocityProblemSolver.getResult().iterations; }; - // Since the velocity explodes in the quasistatic case, use the - // displacement as a convergence criterion - // Q: is this reasonable? Vector u; - Vector u_saved; + Vector v_saved; ScalarVector alpha_saved; double lastStateCorrection; for (size_t stateFPI = 1; stateFPI <= maximumStateFPI; ++stateFPI) { @@ -410,7 +407,7 @@ int main(int argc, char *argv[]) { std::cout << '.' << std::flush; if (stateFPI > 1) { - double const velocityCorrection = AMNorm.diff(u_saved, u); + double const velocityCorrection = AMNorm.diff(v_saved, v); if (velocityCorrection < fixedPointTolerance) break; } @@ -418,7 +415,7 @@ int main(int argc, char *argv[]) { DUNE_THROW(Dune::Exception, "FPI failed to converge"); alpha_saved = alpha; - u_saved = u; + v_saved = v; } if (printProgress) std::cout << std::endl;