mtl5.sparse.minres#

mtl5.sparse.minres(A, b, *, rtol=1e-10, maxiter=1000, M=None, callback=None, device=None)#

MINRES, for symmetric systems that may be indefinite — where CG does not apply.

Parameters:
  • A (MTL5 SparseMatrix or scipy.sparse matrix)

  • b (array-like)

  • rtol (float) – Relative residual tolerance.

  • maxiter (int) – Iteration cap. info is 1 if it is reached without converging.

  • M (preconditioner, optional) – Any object from this module’s preconditioner factories — ilu0, ic0, diagonal, ssor, ilut, ildl, block_diagonal, identity. Defaults to identity, i.e. unpreconditioned.

  • callback (callable, optional) – Reserved for per-iteration monitoring. Currently raises NotImplementedError.

  • device (str, optional) – Reserved for KPU dispatch. Currently raises NotImplementedError for anything other than ‘cpu’.

Returns:

  • x (np.ndarray) – Solution vector.

  • info (int) – 0 on convergence, nonzero otherwise.