gemseo.algos.linear_solvers.scipy_linalg.settings.base_scipy_linalg_settings module#
Settings for the SciPy linear solvers.
- Settings BaseSciPyLinalgSettingsBase(*, store_residuals=False, use_ilu_precond=False, save_when_fail=False, atol=0.0, rtol=1e-12, callback=None, maxiter=1000, x0=None, M=None)[source]#
Bases:
BaseLinearSolverSettingsThe settings of the SciPy GMRES algorithm.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
store_residuals (bool) --
By default it is set to False.
use_ilu_precond (bool) --
By default it is set to False.
save_when_fail (bool) --
By default it is set to False.
atol (Annotated[float, Ge(ge=0)]) --
By default it is set to 0.0.
rtol (Annotated[float, Gt(gt=0)]) --
By default it is set to 1e-12.
callback (Annotated[Callable, WithJsonSchema(json_schema={}, mode=None)] | None)
maxiter (Annotated[int, Gt(gt=0)]) --
By default it is set to 1000.
x0 (ndarray | None)
M (LinearOperator | ndarray | sparray | None)
- Return type:
None
- M: LinearOperator | ndarray | sparray | None = None#
The preconditioner approximating the inverse of A.
- atol: NonNegativeFloat = 0.0#
The absolute tolerance.
Algorithm stops if norm(b - A @ x) <= max(rtol*norm(b), atol).
- Constraints:
ge = 0
- callback: Annotated[Callable, WithJsonSchema({})] | None = None#
The user-supplied function to call after each iteration.
It is called as callback(xk), where xk is the current solution vector. If
None, no function is called.
- maxiter: PositiveInt = 1000#
Maximum number of iterations.
- Constraints:
gt = 0
- rtol: PositiveFloat = 1e-12#
The relative tolerance.
Algorithm stops if norm(b - A @ x) <= max(rtol*norm(b), atol).
- Constraints:
gt = 0
- model_post_init(context, /)#
We need to both initialize private attributes and call the user-defined model_post_init method.
- Parameters:
self (BaseModel)
context (Any)
- Return type:
None