SRLazyCG(diag_shift=0.01, tol=1e-05, atol=0.0, maxiter=None, M=None, centered=True)¶
Computes x = ⟨S⟩⁻¹⟨F⟩ by using an iterative conjugate gradient method.
See Jax docs for more informations.
__init__(diag_shift=0.01, tol=1e-05, atol=0.0, maxiter=None, M=None, centered=True)¶
Initialize self. See help(type(self)) for accurate signature.
M: Optional[Union[Callable, Any]] = None¶
Preconditioner for A. The preconditioner should approximate the inverse of A. Effective preconditioning dramatically improves the rate of convergence, which implies that fewer iterations are needed to reach a given error tolerance.
centered: bool = True¶
Uses S=⟨ΔÔᶜΔÔ⟩ if True (default), S=⟨ÔᶜΔÔ⟩ otherwise. The two forms are mathematically equivalent, but might lead to different results due to numerical precision. The non-centered variaant should bee approximately 33% faster.
maxiter: int = None¶
Maximum number of iterations. Iteration will stop after maxiter steps even if the specified tolerance has not been achieved.