qmr — quasi minimal resiqual method with preconditioning
[x,flag,err,iter,res] = qmr(A,b,x0,M1,M1p,M2,M2p,maxi,tol)
matrix of size n-by-n or function returning A*x
right hand side vector
initial guess vector (default: zeros(n,1))
left preconditioner: matrix or function returning M1*x
(In the first case, default: eye(n,n))
must only be provided when M1
is a function. In this case M1p
is the function which returns M1'*x
right preconditioner: matrix or function returning M2*x
(In the first case, default: eye(n,n))
must only be provided when M2
is a function. In this case M2p
is the function which returns M2'*x
maximum number of iterations (default: n)
error tolerance (default: 1000*%eps)
solution vector
gmres
converged to the desired tolerance within maxi
iterations
no convergence given maxi
residual vector
final residual norm
number of iterations performed