]> https://gitweb.dealii.org/ - dealii.git/commitdiff
residual not used anymore
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 22 Feb 2001 10:38:02 +0000 (10:38 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 22 Feb 2001 10:38:02 +0000 (10:38 +0000)
git-svn-id: https://svn.dealii.org/trunk@4008 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/solver_richardson.h

index 7850c5c4036cb0a90cada11d476ad507eee4e619..847f2b40971a88eda4cab24fa55ade0f4e701ee5 100644 (file)
@@ -185,7 +185,11 @@ SolverRichardson<VECTOR>::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)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.