- class trainsum.gmres.GMRES(nsteps=10, subspace=10, eps=1e-08, solver=<trainsum.lstsqsolver.LstsqSolver object>)
GMRES linear solver.
- Parameters:
nsteps (int)
subspace (int)
eps (float)
solver (MatrixLeastSquares)
- nsteps: int = 10
Number of times the subspace is created and solved
- subspace: int = 10
Size of the Arnoldi basis
- eps: float = 1e-08
Minimum residual, after which the algorithm is stopped
- solver: MatrixLeastSquares = <trainsum.lstsqsolver.LstsqSolver object>
Least squares solver for solving the matrix in the Arnoldi basis
- Parameters:
A (T)
b (T)
- Return type:
T
- __call__(mat, rhs, guess=None, /)
Solve the linear system with mat being a linear operator and rhs being the right hand side of the equation. The initial guess can be provided, otherwise it will be initialized to zero.
- Parameters:
mat (Callable[[T], T])
rhs (T)
guess (T | None)
- Return type: