bw2calc.jacobi_gmres_lca#
Classes#
Solve |
Module Contents#
- class bw2calc.jacobi_gmres_lca.JacobiGMRESLCA(*args, rtol: float = 1e-08, atol: float = 0.0, restart: int | None = 50, maxiter: int | None = 300, use_guess: bool = True, **kwargs)[source]#
Bases:
bw2calc.lca.LCASolve
Ax=bwith GMRES using a Jacobi preconditioner.The preconditioner is the inverse of the technosphere diagonal, i.e.
D^-1. This prior decomposition can significantly improve convergence for certain types of matrices, especially those with dominant diagonal entries.- Parameters:
demand (dict) – Functional unit mapping passed through to
bw2calc.lca.LCA.data_objs (iterable) – Datapackages passed through to
bw2calc.lca.LCA.rtol (float) – Relative tolerance for GMRES convergence. Convergence is checked against a threshold comparable to
max(rtol * ||b||, atol).atol (float) – Absolute tolerance floor for GMRES convergence.
restart (int or None) – Number of iterations between GMRES restarts.
Noneuses SciPy defaults.maxiter (int or None) – Maximum number of outer GMRES iterations.
use_guess (bool) – If
True, reuse the previous solution asx0for subsequent solves in the same instance.