Expand description
Restarted GMRES (generalized minimal residual method) for complex linear systems given only through matrix-vector products. treams-rs extension.
Each cycle builds an orthonormal Krylov basis of at most restart vectors by
Arnoldi iteration, with two passes of modified Gram-Schmidt per vector, and takes
the least-squares update through Givens rotations. A cycle ends early when the
rotated residual estimate meets the tolerance, the new Krylov vector vanishes, or
the iteration limit is reached. Before it accepts an answer or
restarts, the solver recomputes the true residual b - A x with one more operator
application, and only that residual decides convergence.
Structsยง
- Convergence
- Proof of convergence for one right-hand side: the residual
b - A xrecomputed from the returned answerx, not the estimate of the Arnoldi iteration. - Gmres
Options - Accuracy and memory budget of restarted GMRES.
- Krylov ๐
- One columnโs independent Arnoldi iteration. Batching changes when its operator products run, not its arithmetic or convergence decisions.
Functionsยง
- apply_
columns ๐ - Pack active columns only when there is more than one: scalar solves and the tail of a batch lend their existing Krylov or answer buffer directly.
- gmres ๐
- Solve
A x = rhsfor the operator thatapplymultiplies with, starting fromx = 0. Fails withError::NotConvergedwhen the residual is not finite, when the iterations reachoptions.max_iterations, or when the Arnoldi iteration breaks down before convergence; errors ofapplypass through. - gmres_
batch ๐ - Independent GMRES solves of
columnscolumn-major right-hand sides. Only the operator applications are shared: each column keeps its own Krylov basis, rotations, restart decisions and true-residual convergence certificate. - norm ๐
- Euclidean norm without overflow or underflow of the squared terms.