From 3fb7220f3bf614fe84819f75a174816ec60a9f72 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 27 Jul 2001 12:00:26 +0000 Subject: [PATCH] Check reduced residual for equality as well. git-svn-id: https://svn.dealii.org/trunk@4861 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/solver_control.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 2.39.5