Skip to content

tfqmr

sparse · scripts/sparse/tfqmr.m

x = tfqmr (A, b, tol, maxit, M1, M2, x0)
[x, flag, relres, iter, resvec] = tfqmr (...)

Transpose-free quasi-minimal residual method for A*x = b with a general
square A.  A is a matrix or a function handle returning A*x; the
preconditioner is M = M1*M2 (matrices or handles returning M\x).  The
method works in half steps: iter can end in .5 and resvec holds the
quasi-residual bound after every half step (2*iter+1 entries).
flag: 0 converged, 1 maxit reached, 2 preconditioner failure,
3 stagnation, 4 breakdown.