]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Take over changes 1.40->1.41.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 14 Nov 2001 13:31:13 +0000 (13:31 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 14 Nov 2001 13:31:13 +0000 (13:31 +0000)
git-svn-id: https://svn.dealii.org/branches/Branch-3-2@5198 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/solver_bicgstab.h

index 4bb43692790f1198ff8eccde817575b93eb73272..be939f437216c02cd65df119999d69f265bb145b 100644 (file)
@@ -307,6 +307,8 @@ SolverBicgstab<VECTOR>::iterate(const MATRIX& A,
   
   do
     {
+      ++step;
+      
       rhobar = r*rbar;
       beta   = rhobar * alpha / (rho * omega);
       rho    = rhobar;
@@ -321,7 +323,7 @@ SolverBicgstab<VECTOR>::iterate(const MATRIX& A,
 
       if (std::fabs(alpha) > 1.e10)
        return true;
-    
+      
       s.equ(1., r, -alpha, v);
       precondition.vmult(z,s);
       A.vmult(t,z);
@@ -335,7 +337,7 @@ SolverBicgstab<VECTOR>::iterate(const MATRIX& A,
       else
        res = r.l2_norm();
       
-      state = control().check(++step, res);
+      state = control().check(step, res);
       print_vectors(step, *Vx, r, y);
     }
   while (state == SolverControl::iterate);
@@ -370,9 +372,10 @@ SolverBicgstab<VECTOR>::solve(const MATRIX &A,
   
   do 
     {
-      if (step)
+      if (step != 0)
        deallog << "Restart step " << step << std::endl;
-      if (start(A) == SolverControl::success) break;  
+      if (start(A) == SolverControl::success)
+       break;
       state = iterate(A, precondition);
     }
   while (state);

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.