QMR
Usage
#
IterativeSolvers.qmr
— Function
qmr(A, b; kwargs...) -> x, [history]
Same as qmr!
, but allocates a solution vector x
initialized with zeros.
#
IterativeSolvers.qmr!
— Function
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
: Iftrue
assumes thatiszero(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)
, wherer_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.
QMR can be used as an iterator via |