From: Wolfgang Bangerth Date: Fri, 27 Jul 2001 12:00:26 +0000 (+0000) Subject: Check reduced residual for equality as well. X-Git-Tag: v8.0.0~18937 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fb7220f3bf614fe84819f75a174816ec60a9f72;p=dealii.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