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,
)[source]#

Pre-allocated state for the restarted Generalized Minimum Residual solver.

See LinearSolverState for the shared constructor parameters, plus:

Parameters:
  • restart (int) – the k in GMRES[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 M should 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 M may be freely changed (or toggled between None and 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,
)[source]#
Parameters:

Methods

__init__(A, b, x[, tol, atol, restart, ...])