qmr
- :
x =qmr(A, b, rtol, maxit, M1, M2, x0)¶ - :
x =qmr(A, b, rtol, maxit, P)¶ - :
[x, flag, relres, iter, resvec] =qmr(A, b, …)¶ Solve
A x = bwith the quasi-minimal residual method of Freund and Nachtigal, in its basic form without look-ahead.Optional inputs, each of which may be left out or passed as
[]to take its default:- rtol: relative residual tolerance, default
1e-6. - maxit: iteration limit, default
min (20, numel (b)). - x0: starting vector, default all zeros.
The method needs products with both A and its transpose, so when A is given as a function it is called with two arguments:
f (x, "notransp")must returnA * xandf (x, "transp")must returnA' * x.A preconditioner P may be supplied as two factors M1 and M2 with
P = M1 * M2, or as a single matrix P in the place of M1. A factor given as a function follows the same two-argument convention and must returnM \ xfor"notransp"andM' \ xfor"transp".Outputs beyond x:
- flag:
0when the tolerance was met,1when the iteration limit was reached first,3when the iterates stopped changing. The value2is never produced; it is reserved so that the numbering matches the other iterative solvers. - relres: the relative residual of the returned x.
- iter: the number of iterations taken.
- resvec: the residual norm after each iteration.
References: R. W. Freund and N. M. Nachtigal, "QMR: a quasi-minimal residual method for non-Hermitian linear systems", Numer. Math. 60 (1991); and the iterative-methods templates book by Barrett, Berry, Chan, Demmel, Donato, Dongarra, Eijkhout, Pozo, Romine and van der Vorst, SIAM, 2nd ed., 1994.
- rtol: relative residual tolerance, default