NLA-lib Explorer

NLAlib.gmresIterate

Library · def

The GMRES iterate after q steps from \mathbf{x}_0, with \mathbf{r}_0 = \mathbf{b} - \mathbf{A}\mathbf{x}_0: \mathsf{gmresIterate}(\mathbf{A}, \mathbf{b}, \mathbf{x}_0, q) := \mathbf{x}_0 + \mathsf{minResidualInverse}(\mathbf{A}, \mathbf{K}_q(\mathbf{A}, \mathbf{r}_0))\,\mathbf{r}_0, which is \mathbf{x}_0 + \mathbf{Q}(\mathbf{A}\mathbf{Q})^{+}\mathbf{r}_0 for every orthonormal basis \mathbf{Q} of \mathcal{K}_q(\mathbf{A}, \mathbf{r}_0). For Hermitian \mathbf{A} it is the MINRES iterate. Basis-free, total, not an algorithm; for singular \mathbf{A} the correction of least norm among the minimisers. Arnoldi with a small least-squares problem computes it (gmresIterate_eq_mgsArnoldiMatrix); for Hermitian \mathbf{A}, Lanczos does (Matrix.IsHermitian.gmresIterate_eq_lanczosMatrix). [SaadSchultz1986, Algorithm 3]; [Saad2003, §6.5]; [PaigeSaunders1975, §6]. Saad and Schultz define the iterate as the minimiser (4) of the residual over \mathbf{x}_0 + \mathcal{K}_q, computed in the Arnoldi basis; Paige and Saunders define MINRES, the real symmetric case with \mathbf{x}_0 = \mathbf{0}, by the minimum residual problem (2.7) in the Lanczos basis, whose solution is the one of minimum length.

NLAlib.gmresIterate.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2} [Fintype n] [DecidableEq n]
  (A : Matrix n n 𝕜) (b x₀ : n → 𝕜) (q : ℕ) : n → 𝕜

Full source on GitHub

Import NLAlib.Krylov.LinearSystems.GMRES.