{ } Raw JSON

bundles / scipy 1.18.0 / scipy / sparse / linalg / _isolve / _gcrotmk / _fgmres

function

scipy.sparse.linalg._isolve._gcrotmk:_fgmres

source: /scipy/sparse/linalg/_isolve/_gcrotmk.py:16

Signature

def _fgmres(matvec, v0, m, atol, lpsolve = None, rpsolve = None, cs = (), outer_v = (), prepend_outer_v = False)

Summary

FGMRES Arnoldi process, with optional projection or augmentation

Parameters

matvec : callable

Operation A*x

v0 : ndarray

Initial vector, normalized to nrm2(v0) == 1

m : int

Number of GMRES rounds

atol : float

Absolute tolerance for early exit

lpsolve : callable

Left preconditioner L

rpsolve : callable

Right preconditioner R

cs : list of (ndarray, ndarray)

Columns of matrices C and U in GCROT

outer_v : list of ndarrays

Augmentation vectors in LGMRES

prepend_outer_v : bool, optional

Whether augmentation vectors come before or after Krylov iterates

Returns

Q, R : ndarray

QR decomposition of the upper Hessenberg H=QR

B : ndarray

Projections corresponding to matrix C

vs : list of ndarray

Columns of matrix V

zs : list of ndarray

Columns of matrix Z

y : ndarray

Solution to ||H y - e_1||_2 = min!

res : float

The final (preconditioned) residual norm

Raises

: LinAlgError

If nans encountered

Aliases

  • scipy.sparse.linalg._isolve._gcrotmk._fgmres