GMRES#

Source: solvers/gmres.py

Matrix-free restarted GMRES(m) linear solver for the implicit Newton step.

Never assembles the Jacobian: each inner iteration applies J.v (the compiled/eager Matvec). Best for the well-conditioned near-identity systems of implicit backward-Euler updates, where a handful of matvecs beat an O(N^3) dense factorization. Configure it as a Newton linear_solver.

Other options#

restartint · default 40

GMRES(m) restart width (Krylov subspace size)

max_itsint · default 1000

Maximum inner (Krylov) iterations per Newton step

abs_tolfloat · default 0.0

Absolute inner-residual tolerance (0 disables the absolute test)

rel_tolfloat · default 0.0001

Relative inner-residual tolerance. Loose is fine (and faster): the outer Newton re-solves each step, so an inexact inner solve still converges – tighten only for stiff/ill-conditioned systems

preconditionerstr

Preconditioner object (a [Solvers] NoPreconditioner / Jacobi / BlockJacobi / FullPreconditioner); unset = no preconditioner

cache_strategystr · default none

Preconditioner rebuild policy across Newton iterations: none (rebuild each step) | chord (build once, reuse) | max_its (rebuild when a solve exceeds cache_max_its iterations)

cache_max_itsint · default 10

Iteration bar that triggers a preconditioner rebuild under the max_its cache strategy