warp.optim.linear.GMRES#
- class warp.optim.linear.GMRES(
- A,
- b,
- x,
- tol=None,
- atol=None,
- restart=31,
- maxiter=0,
- M=None,
- callback=None,
- check_every=31,
- use_cuda_graph=True,
- is_left_preconditioner=False,
Pre-allocated state for the restarted Generalized Minimum Residual solver.
See
LinearSolverStatefor the shared constructor parameters, plus:- Parameters:
restart (int) – the
kinGMRES[k]. Determines the size of the Krylov subspace and the corresponding Hessenberg/basis allocations. Larger values reduce iteration count at the cost of memory.is_left_preconditioner (bool) – whether
Mshould be used as a left- or right- preconditioner.A (array | BsrMatrix | LinearOperator)
b (array)
x (array)
tol (float | None)
atol (float | None)
maxiter (float | None)
M (array | BsrMatrix | LinearOperator | None)
callback (Callable | None)
check_every (int)
use_cuda_graph (bool)
The preconditioner
Mmay be freely changed (or toggled betweenNoneand a valid operator) between calls.- __init__(
- A,
- b,
- x,
- tol=None,
- atol=None,
- restart=31,
- maxiter=0,
- M=None,
- callback=None,
- check_every=31,
- use_cuda_graph=True,
- is_left_preconditioner=False,
Methods
__init__(A, b, x[, tol, atol, restart, ...])