gemseo.algos.linear_solvers.scipy_linalg.settings.gcrot module#
Settings for the SciPy GCROT algorithm.
- Settings GCROT_Settings(*, 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, m=30, k=30, CU=None, discard_C=True, truncate='oldest')[source]#
Bases:
BaseSciPyLinalgSettingsBaseThe settings of the SciPy GCROT 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)
m (Annotated[int, Gt(gt=0)]) --
By default it is set to 30.
k (Annotated[int, Gt(gt=0)]) --
By default it is set to 30.
CU (Iterable[tuple[ndarray[Any, dtype[number[Any]]], ndarray[Any, dtype[number[Any]]]]] | None)
discard_C (bool) --
By default it is set to True.
truncate (Literal['oldest', 'smallest']) --
By default it is set to "oldest".
- Return type:
None
- CU: Iterable[tuple[NumberArray, NumberArray]] | None = None#
List of tuples (c, u) required to form the matrices C and U.
If
Nonestart from empty matrices.
- k: PositiveInt = 30#
Number of vectors to carry between inner FGMRES iterations.
If
Noneuse the same value asm.- Constraints:
gt = 0
- m: PositiveInt = 30#
Number of inner FGMRES iterations per each outer iteration.
- Constraints:
gt = 0
- truncate: Literal['oldest', 'smallest'] = 'oldest'#
The vectors from the previous cycle to drop.
- 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