Commit b86b84f0 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed bug in GMRES solver.

The nextIteration() method should not be called here because it
increments the iteration counter.
parent 68dcb61b
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -251,14 +251,14 @@ bool tnlGMRESSolver< Matrix, Preconditioner > :: solve( const Vector& b, Vector&
                             sn[ i ] );

         this->setResidue( fabs( s[ i + 1 ] ) / normb );
         if( this->nextIteration() ) {
            this->refreshSolverMonitor();
         }
         else {
         if( this->getIterations() > this->getMinIterations() && this->getResidue() < this->getConvergenceResidue() ) {
            update( i, m, _H, _s, _v, x );
            this->refreshSolverMonitor( true );
            return this->checkConvergence();
         }
         else {
            this->refreshSolverMonitor();
         }
      }
      update( m - 1, m, _H, _s, _v, x );