From 4aa276328905337469dc4578f16893718dcb1edf Mon Sep 17 00:00:00 2001 From: guido Date: Thu, 22 Feb 2001 10:38:02 +0000 Subject: [PATCH] residual not used anymore git-svn-id: https://svn.dealii.org/trunk@4008 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/solver_richardson.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deal.II/lac/include/lac/solver_richardson.h b/deal.II/lac/include/lac/solver_richardson.h index 7850c5c403..847f2b4097 100644 --- a/deal.II/lac/include/lac/solver_richardson.h +++ b/deal.II/lac/include/lac/solver_richardson.h @@ -185,7 +185,11 @@ SolverRichardson::solve (const MATRIX &A, // Main loop for(int iter=0; conv==SolverControl::iterate; iter++) { - res=A.residual(r,x,b); + // Do not use residual, + // but do it in 2 steps + A.vmult(r,x); + r.sadd(-1.,1.,b); + res=sqrt(r*r); conv = control().check (iter, criterion()); if (conv != SolverControl::iterate) -- 2.39.5