From: wolf Date: Fri, 27 Jul 2001 12:00:26 +0000 (+0000) Subject: Check reduced residual for equality as well. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e12df76cfbb27dee1769d98114e9c6e42beda8f6;p=dealii-svn.git Check reduced residual for equality as well. git-svn-id: https://svn.dealii.org/trunk@4861 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/solver_control.cc b/deal.II/lac/source/solver_control.cc index 3660cfd05d..9894feaa8b 100644 --- a/deal.II/lac/source/solver_control.cc +++ b/deal.II/lac/source/solver_control.cc @@ -216,13 +216,20 @@ SolverControl::State ReductionControl::check (const unsigned int step, const double check_value) { + // if this is the first time we + // come here, then store the + // residual for later comparisons if (step==0) { initial_val = check_value; reduced_tol = check_value * reduce; }; - if (check_value < reduced_tol) + // check whether desired reduction + // has been achieved. also check + // for equality in case initial + // residual already was zero + if (check_value <= reduced_tol) { if (_log_result) deallog << "Convergence step " << step