BiLQR
Krylov.bilqr
— Function(x, y, stats) = bilqr(A, b::AbstractVector{FC}, c::AbstractVector{FC};
transfer_to_bicg::Bool=true, atol::T=√eps(T),
rtol::T=√eps(T), itmax::Int=0,
timemax::Float64=Inf, verbose::Int=0, history::Bool=false,
callback=solver->false, iostream::IO=kstdout)
T
is an AbstractFloat
such as Float32
, Float64
or BigFloat
. FC
is T
or Complex{T}
.
(x, y, stats) = bilqr(A, b, c, x0::AbstractVector, y0::AbstractVector; kwargs...)
BiLQR can be warm-started from initial guesses x0
and y0
where kwargs
are the same keyword arguments as above.
Combine BiLQ and QMR to solve adjoint systems.
[0 A] [y] = [b]
[Aᴴ 0] [x] [c]
The relation bᴴc ≠ 0
must be satisfied. BiLQ is used for solving primal system Ax = b
of size n. QMR is used for solving dual system Aᴴy = c
of size n.
Input arguments
A
: a linear operator that models a matrix of dimension n;b
: a vector of length n;c
: a vector of length n.
Optional arguments
x0
: a vector of length n that represents an initial guess of the solution x;y0
: a vector of length n that represents an initial guess of the solution y.
Keyword arguments
transfer_to_bicg
: transfer from the BiLQ point to the BiCG point, when it exists. The transfer is based on the residual norm;atol
: absolute stopping tolerance based on the residual norm;rtol
: relative stopping tolerance based on the residual norm;itmax
: the maximum number of iterations. Ifitmax=0
, the default number of iterations is set to2n
;timemax
: the time limit in seconds;verbose
: additional details can be displayed if verbose mode is enabled (verbose > 0). Information will be displayed everyverbose
iterations;history
: collect additional statistics on the run such as residual norms, or Aᴴ-residual norms;callback
: function or functor called ascallback(solver)
that returnstrue
if the Krylov method should terminate, andfalse
otherwise;iostream
: stream to which output is logged.
Output arguments
x
: a dense vector of length n;y
: a dense vector of length n;stats
: statistics collected on the run in anAdjointStats
structure.
Reference
- A. Montoison and D. Orban, BiLQ: An Iterative Method for Nonsymmetric Linear Systems with a Quasi-Minimum Error Property, SIAM Journal on Matrix Analysis and Applications, 41(3), pp. 1145–1166, 2020.
Krylov.bilqr!
— Functionsolver = bilqr!(solver::BilqrSolver, A, b, c; kwargs...)
solver = bilqr!(solver::BilqrSolver, A, b, c, x0, y0; kwargs...)
where kwargs
are keyword arguments of bilqr
.
See BilqrSolver
for more details about the solver
.
TriLQR
Krylov.trilqr
— Function(x, y, stats) = trilqr(A, b::AbstractVector{FC}, c::AbstractVector{FC};
transfer_to_usymcg::Bool=true, atol::T=√eps(T),
rtol::T=√eps(T), itmax::Int=0,
timemax::Float64=Inf, verbose::Int=0, history::Bool=false,
callback=solver->false, iostream::IO=kstdout)
T
is an AbstractFloat
such as Float32
, Float64
or BigFloat
. FC
is T
or Complex{T}
.
(x, y, stats) = trilqr(A, b, c, x0::AbstractVector, y0::AbstractVector; kwargs...)
TriLQR can be warm-started from initial guesses x0
and y0
where kwargs
are the same keyword arguments as above.
Combine USYMLQ and USYMQR to solve adjoint systems.
[0 A] [y] = [b]
[Aᴴ 0] [x] [c]
USYMLQ is used for solving primal system Ax = b
of size m × n. USYMQR is used for solving dual system Aᴴy = c
of size n × m.
Input arguments
A
: a linear operator that models a matrix of dimension m × n;b
: a vector of length m;c
: a vector of length n.
Optional arguments
x0
: a vector of length n that represents an initial guess of the solution x;y0
: a vector of length m that represents an initial guess of the solution y.
Keyword arguments
transfer_to_usymcg
: transfer from the USYMLQ point to the USYMCG point, when it exists. The transfer is based on the residual norm;atol
: absolute stopping tolerance based on the residual norm;rtol
: relative stopping tolerance based on the residual norm;itmax
: the maximum number of iterations. Ifitmax=0
, the default number of iterations is set tom+n
;timemax
: the time limit in seconds;verbose
: additional details can be displayed if verbose mode is enabled (verbose > 0). Information will be displayed everyverbose
iterations;history
: collect additional statistics on the run such as residual norms, or Aᴴ-residual norms;callback
: function or functor called ascallback(solver)
that returnstrue
if the Krylov method should terminate, andfalse
otherwise;iostream
: stream to which output is logged.
Output arguments
x
: a dense vector of length n;y
: a dense vector of length m;stats
: statistics collected on the run in anAdjointStats
structure.
Reference
- A. Montoison and D. Orban, BiLQ: An Iterative Method for Nonsymmetric Linear Systems with a Quasi-Minimum Error Property, SIAM Journal on Matrix Analysis and Applications, 41(3), pp. 1145–1166, 2020.
Krylov.trilqr!
— Functionsolver = trilqr!(solver::TrilqrSolver, A, b, c; kwargs...)
solver = trilqr!(solver::TrilqrSolver, A, b, c, x0, y0; kwargs...)
where kwargs
are keyword arguments of trilqr
.
See TrilqrSolver
for more details about the solver
.