Engee documentation

QMR

QMR is a short-recurrence version of GMRES for solving approximately for where is a linear operator and the right-hand side vector. may be non-symmetric.

Usage

qmr(A, b; kwargs...) -> x, [history]

Same as qmr!, but allocates a solution vector x initialized with zeros.

qmr!(x, A, b; kwargs...) -> x, [history]

Solves the problem with the Quasi-Minimal Residual (QMR) method.

Arguments

  • x: Initial guess, will be updated in-place;

  • A: linear operator;

  • b: right-hand side.

Keywords

  • initally_zero::Bool: If true assumes that iszero(x) so that one matrix-vector product can be saved when computing the initial residual vector;

  • maxiter::Int = size(A, 2): maximum number of iterations;

  • abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))): absolute and relative tolerance for the stopping condition |r_k| ≤ max(reltol * |r_0|, abstol), where r_k = A * x_k - b

  • log::Bool: keep track of the residual norm in each iteration;

  • verbose::Bool: print convergence information during the iteration.

Return values

if log is false

  • x: approximate solution.

if log is true

  • x: approximate solution;

  • history: convergence history.

Implementation details

QMR exploits the tridiagonal structure of the Hessenberg matrix. Although QMR is similar to GMRES, where instead of using the Arnoldi process, a pair of biorthogonal vector spaces and is constructed via the Lanczos process. It requires that the adjoint of adjoint(A) be available.

QMR enables the computation of and via a three-term recurrence. A three-term recurrence for the projection onto the solution vector can also be constructed from these values, using the portion of the last column of the Hessenberg matrix. Therefore we pre-allocate only eight vectors.

For more detail on the implementation see the original paper [1] or [2].

QMR can be used as an iterator via qmr_iterable!. This makes it possible to access the next, current, and previous Krylov basis vectors during the iteration.


1. Freund, W. R., & Nachtigal, N. M. (1990). QMR : for a Quasi-Minimal Residual Linear Method Systems. (December).
2. Saad, Y. (2003). Interactive method for sparse linear system.