SYMMLQ

Krylov.symmlqFunction
(x, stats) = symmlq(A, b::AbstractVector{FC};
                    M=I, ldiv::Bool=false, window::Int=5,
                    transfer_to_cg::Bool=true, λ::T=zero(T),
                    λest::T=zero(T), etol::T=√eps(T),
                    conlim::T=1/√eps(T), atol::T=√eps(T),
                    rtol::T=√eps(T), itmax::Int=0,
                    timemax::Float64=Inf, verbose::Int=0, history::Bool=false,
                    callback=workspace->false, iostream::IO=kstdout)

T is an AbstractFloat such as Float32, Float64 or BigFloat. FC is T or Complex{T}.

(x, stats) = symmlq(A, b, x0::AbstractVector; kwargs...)

SYMMLQ can be warm-started from an initial guess x0 where kwargs are the same keyword arguments as above

Solve the shifted linear system

(A + λI) x = b

of size n using the SYMMLQ method, where λ is a shift parameter, and A is Hermitian.

SYMMLQ produces monotonic errors ‖x* - x‖₂.

Interface

To easily switch between Krylov methods, use the generic interface krylov_solve with method = :symmlq.

For an in-place variant that reuses memory across solves, see symmlq!.

Input arguments

  • A: a linear operator that models a Hermitian matrix of dimension n;
  • b: a vector of length n.

Optional argument

  • x0: a vector of length n that represents an initial guess of the solution x.

Keyword arguments

  • M: linear operator that models a Hermitian positive-definite matrix of size n used for centered preconditioning;
  • ldiv: define whether the preconditioner uses ldiv! or mul!;
  • window: number of iterations used to accumulate a lower bound on the error;
  • transfer_to_cg: transfer from the SYMMLQ point to the CG point, when it exists. The transfer is based on the residual norm;
  • λ: regularization parameter;
  • λest: positive strict lower bound on the smallest eigenvalue λₘᵢₙ when solving a positive-definite system, such as λest = (1-10⁻⁷)λₘᵢₙ;
  • atol: absolute stopping tolerance based on the residual norm;
  • rtol: relative stopping tolerance based on the residual norm;
  • etol: stopping tolerance based on the lower bound on the error;
  • conlim: limit on the estimated condition number of A beyond which the solution will be abandoned;
  • itmax: the maximum number of iterations. If itmax=0, the default number of iterations is set to 2n;
  • timemax: the time limit in seconds;
  • verbose: additional details can be displayed if verbose mode is enabled (verbose > 0). Information will be displayed every verbose iterations;
  • history: collect additional statistics on the run such as residual norms, or Aᴴ-residual norms;
  • callback: function or functor called as callback(workspace) that returns true if the Krylov method should terminate, and false otherwise;
  • iostream: stream to which output is logged.

Output arguments

  • x: a dense vector of length n;
  • stats: statistics collected on the run in a SymmlqStats structure.

Reference

source
Krylov.symmlq!Function
workspace = symmlq!(workspace::SymmlqWorkspace, A, b; kwargs...)
workspace = symmlq!(workspace::SymmlqWorkspace, A, b, x0; kwargs...)

In these calls, kwargs are keyword arguments of symmlq.

See SymmlqWorkspace for instructions on how to create the workspace.

For a more generic interface, you can use krylov_workspace to allocate the workspace, and krylov_solve! to run the Krylov method in-place.

source

MINRES

Krylov.minresFunction
(x, stats) = minres(A, b::AbstractVector{FC};
                    M=I, ldiv::Bool=false, window::Int=5,
                    linesearch::Bool=false, λ::T=zero(T), atol::T=√eps(T),
                    rtol::T=√eps(T), etol::T=√eps(T),
                    conlim::T=1/√eps(T), itmax::Int=0,
                    timemax::Float64=Inf, verbose::Int=0, history::Bool=false,
                    callback=workspace->false, iostream::IO=kstdout)

T is an AbstractFloat such as Float32, Float64 or BigFloat. FC is T or Complex{T}.

(x, stats) = minres(A, b, x0::AbstractVector; kwargs...)

MINRES can be warm-started from an initial guess x0 where kwargs are the same keyword arguments as above.

Solve the shifted linear least-squares problem

minimize ‖b - (A + λI)x‖₂²

or the shifted linear system

(A + λI) x = b

of size n using the MINRES method, where λ ≥ 0 is a shift parameter, where A is Hermitian.

MINRES is formally equivalent to applying CR to Ax=b when A is positive definite, but is typically more stable and also applies to the case where A is indefinite.

MINRES produces monotonic residuals ‖r‖₂ and optimality residuals ‖Aᴴr‖₂.

Interface

To easily switch between Krylov methods, use the generic interface krylov_solve with method = :minres.

For an in-place variant that reuses memory across solves, see minres!.

Input arguments

  • A: a linear operator that models a Hermitian matrix of dimension n;
  • b: a vector of length n.

Optional argument

  • x0: a vector of length n that represents an initial guess of the solution x.

Keyword arguments

  • M: linear operator that models a Hermitian positive-definite matrix of size n used for centered preconditioning;

  • ldiv: define whether the preconditioner uses ldiv! or mul!;

  • window: number of iterations used to accumulate a lower bound on the error;

  • linesearch: if true, indicate that the solution is to be used in an inexact Newton method with linesearch. If linesearch is true and nonpositive curvature is detected, the solution depends on the iteration: at iteration k = 1, the right-hand side is returned with workspace.npc_dir as the preconditioned initial residual; at iteration k > 1, the solution from iteration k-1 is returned with workspace.npc_dir as the most recent residual. (Note that the MINRES solver starts at iteration 1, so the first iteration is k = 1);

  • λ: regularization parameter;

  • atol: absolute stopping tolerance based on the residual norm;

  • rtol: relative stopping tolerance based on the residual norm;

  • etol: stopping tolerance based on the lower bound on the error;

  • conlim: limit on the estimated condition number of A beyond which the solution will be abandoned;

  • itmax: the maximum number of iterations. If itmax=0, the default number of iterations is set to 2n;

  • timemax: the time limit in seconds;

  • verbose: additional details can be displayed if verbose mode is enabled (verbose > 0). Information will be displayed every verbose iterations;

  • history: collect additional statistics on the run such as residual norms, or Aᴴ-residual norms;

  • callback: function or functor called as callback(workspace) that returns true if the Krylov method should terminate, and false otherwise;

  • iostream: stream to which output is logged.

Output arguments

  • x: a dense vector of length n;
  • stats: statistics collected on the run in a SimpleStats structure.

References

source
Krylov.minres!Function
workspace = minres!(workspace::MinresWorkspace, A, b; kwargs...)
workspace = minres!(workspace::MinresWorkspace, A, b, x0; kwargs...)

In these calls, kwargs are keyword arguments of minres.

See MinresWorkspace for instructions on how to create the workspace.

For a more generic interface, you can use krylov_workspace to allocate the workspace, and krylov_solve! to run the Krylov method in-place.

source

MINRES-QLP

Krylov.minres_qlpFunction
(x, stats) = minres_qlp(A, b::AbstractVector{FC};
                        M=I, ldiv::Bool=false, Artol::T=√eps(T),
                        λ::T=zero(T), atol::T=√eps(T),
                        rtol::T=√eps(T), itmax::Int=0,
                        timemax::Float64=Inf, verbose::Int=0, history::Bool=false,
                        callback=workspace->false, iostream::IO=kstdout)

T is an AbstractFloat such as Float32, Float64 or BigFloat. FC is T or Complex{T}.

(x, stats) = minres_qlp(A, b, x0::AbstractVector; kwargs...)

MINRES-QLP can be warm-started from an initial guess x0 where kwargs are the same keyword arguments as above.

MINRES-QLP is the only method based on the Lanczos process that returns the minimum-norm solution on singular inconsistent systems (A + λI)x = b of size n, where λ is a shift parameter. It is significantly more complex but can be more reliable than MINRES when A is ill-conditioned.

M also indicates the weighted norm in which residuals are measured.

Interface

To easily switch between Krylov methods, use the generic interface krylov_solve with method = :minres_qlp.

For an in-place variant that reuses memory across solves, see minres_qlp!.

Input arguments

  • A: a linear operator that models a Hermitian matrix of dimension n;
  • b: a vector of length n.

Optional argument

  • x0: a vector of length n that represents an initial guess of the solution x.

Keyword arguments

  • M: linear operator that models a Hermitian positive-definite matrix of size n used for centered preconditioning;
  • ldiv: define whether the preconditioner uses ldiv! or mul!;
  • λ: regularization parameter;
  • atol: absolute stopping tolerance based on the residual norm;
  • rtol: relative stopping tolerance based on the residual norm;
  • Artol: relative stopping tolerance based on the Aᴴ-residual norm;
  • itmax: the maximum number of iterations. If itmax=0, the default number of iterations is set to 2n;
  • timemax: the time limit in seconds;
  • verbose: additional details can be displayed if verbose mode is enabled (verbose > 0). Information will be displayed every verbose iterations;
  • history: collect additional statistics on the run such as residual norms, or Aᴴ-residual norms;
  • callback: function or functor called as callback(workspace) that returns true if the Krylov method should terminate, and false otherwise;
  • iostream: stream to which output is logged.

Output arguments

  • x: a dense vector of length n;
  • stats: statistics collected on the run in a SimpleStats structure.

References

source
Krylov.minres_qlp!Function
workspace = minres_qlp!(workspace::MinresQlpWorkspace, A, b; kwargs...)
workspace = minres_qlp!(workspace::MinresQlpWorkspace, A, b, x0; kwargs...)

In these calls, kwargs are keyword arguments of minres_qlp.

See MinresQlpWorkspace for instructions on how to create the workspace.

For a more generic interface, you can use krylov_workspace to allocate the workspace, and krylov_solve! to run the Krylov method in-place.

source

MINARES

Krylov.minaresFunction
(x, stats) = minares(A, b::AbstractVector{FC};
                     M=I, ldiv::Bool=false,
                     λ::T = zero(T), atol::T=√eps(T),
                     rtol::T=√eps(T), Artol::T = √eps(T),
                     itmax::Int=0, timemax::Float64=Inf,
                     verbose::Int=0, history::Bool=false,
                     callback=workspace->false, iostream::IO=kstdout)

T is an AbstractFloat such as Float32, Float64 or BigFloat. FC is T or Complex{T}.

(x, stats) = minares(A, b, x0::AbstractVector; kwargs...)

MINARES can be warm-started from an initial guess x0 where kwargs are the same keyword arguments as above.

MINARES solves the Hermitian linear system Ax = b of size n. MINARES minimizes ‖Arₖ‖₂ when M = Iₙ and ‖AMrₖ‖M otherwise. The estimates computed every iteration are ‖Mrₖ‖₂ and ‖AMrₖ‖M.

Interface

To easily switch between Krylov methods, use the generic interface krylov_solve with method = :minares.

For an in-place variant that reuses memory across solves, see minares!.

Input arguments

  • A: a linear operator that models a Hermitian positive definite matrix of dimension n;
  • b: a vector of length n.

Optional argument

  • x0: a vector of length n that represents an initial guess of the solution x.

Keyword arguments

  • M: linear operator that models a Hermitian positive-definite matrix of size n used for centered preconditioning;
  • ldiv: define whether the preconditioner uses ldiv! or mul!;
  • λ: regularization parameter;
  • atol: absolute stopping tolerance based on the residual norm;
  • rtol: relative stopping tolerance based on the residual norm;
  • Artol: relative stopping tolerance based on the Aᴴ-residual norm;
  • itmax: the maximum number of iterations. If itmax=0, the default number of iterations is set to 2n;
  • timemax: the time limit in seconds;
  • verbose: additional details can be displayed if verbose mode is enabled (verbose > 0). Information will be displayed every verbose iterations;
  • history: collect additional statistics on the run such as residual norms, or Aᴴ-residual norms;
  • callback: function or functor called as callback(workspace) that returns true if the Krylov method should terminate, and false otherwise;
  • iostream: stream to which output is logged.

Output arguments

  • x: a dense vector of length n;
  • stats: statistics collected on the run in a SimpleStats structure.

Reference

source
Krylov.minares!Function
workspace = minares!(workspace::MinaresWorkspace, A, b; kwargs...)
workspace = minares!(workspace::MinaresWorkspace, A, b, x0; kwargs...)

In these calls, kwargs are keyword arguments of minares.

See MinaresWorkspace for instructions on how to create the workspace.

For a more generic interface, you can use krylov_workspace to allocate the workspace, and krylov_solve! to run the Krylov method in-place.

source