From: wolf Date: Mon, 19 Nov 2001 14:44:55 +0000 (+0000) Subject: Revert the order of checks for a) max. number of iterations, and b) X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4750d329e66f8d24d2b17fe79d53d3dc5fabb49b;p=dealii-svn.git Revert the order of checks for a) max. number of iterations, and b) target residual. The reason is that it happens that we converge on the very last allowed iteration, most often if the system has only 5 or so equations, and we converge in the fifth iteration. git-svn-id: https://svn.dealii.org/trunk@5212 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/solver_control.cc b/deal.II/lac/source/solver_control.cc index a21c2f6cde..0ea571cd3c 100644 --- a/deal.II/lac/source/solver_control.cc +++ b/deal.II/lac/source/solver_control.cc @@ -110,6 +110,14 @@ SolverControl::check (const unsigned int step, deallog << "Starting value " << check_value << std::endl; } + if (check_value <= tol) + { + if (m_log_result) + deallog << "Convergence step " << step + << " value " << check_value << std::endl; + lcheck = success; + return success; + } if ((step >= maxsteps) || #ifdef HAVE_ISNAN @@ -131,14 +139,6 @@ SolverControl::check (const unsigned int step, return failure; } - if (check_value <= tol) - { - if (m_log_result) - deallog << "Convergence step " << step - << " value " << check_value << std::endl; - lcheck = success; - return success; - } lcheck = iterate; return iterate; }