Krylov extension

Loaded with using Krylov. It enables flexible-GMRES iterative refinement (ir_mode = "fgmres", the factorization as right preconditioner) by registering fgmres_correction, which runs Krylov.fgmres!; the operators and the refinement loop live in the core.

SparseDirectSolverKrylovExt.SparseDirectSolverKrylovExt — Module
SparseDirectSolverKrylovExt

FGMRES-IR for SparseDirectSolver (PLAN §2.5, ir_mode = "fgmres"). Loading Krylov.jl registers fgmres_correction in SparseDirectSolver.FGMRES_PROVIDER; the operators (SpMV and the factorization as right preconditioner) and the refinement loop live in the core (src/solve/refinement.jl), this extension only runs Krylov.fgmres!.

source
SparseDirectSolverKrylovExt.fgmres_correction — Method
fgmres_correction(cache, A, P, R, len; atol, itmax) -> (D, iterations)

Solve A D = R[1:len] (the first len entries of the device array R, copied into the Krylov storage) by Krylov.fgmres! with right preconditioner P (mul!), no restart, absolute tolerance atol, relative tolerance 0 and at most itmax iterations. The FgmresWorkspace and the right-hand side vector are kept in cache (a Ref{Any}) and reallocated only when len or the element/array type change or itmax exceeds the stored Krylov basis. D is the workspace's solution vector (valid until the next call).

source