gmres — Generalized Minimum RESidual method
[x,flag,err,iter,res] = gmres(A,b,rstr,tol,maxi,M,x0)
n-by-n matrix or function returning A*x
right hand side vector
initial guess vector (default: zeros(n,1))
preconditioner: matrix or function returning M*x
(In the first case, default: eye(n,n))
number of iterations between restarts (default: 10)
maximum number of iterations (default: n)
error tolerance (default: 1e-6)
solution vector
final residual norm
number of iterations performed
gmres
converged to the desired tolerance within maxi
iterations
no convergence given maxi
residual vector
solves the linear system Ax=b
using the Generalized Minimal residual method with restarts.
of this algorithm are described in :
"Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, Eijkhout, Pozo, Romine, and Van der Vorst, SIAM Publications, 1993 (ftp netlib2.cs.utk.edu; cd linalg; get templates.ps).
"Iterative Methods for Sparse Linear Systems, Second Edition" Saad, SIAM Publications, 2003 (ftp ftp.cs.umn.edu; cd dept/users/saad/PS; get all_ps.zip).