gemseo.algos.linear_solvers.scipy_linalg.settings.lgmres module#

Settings for the SciPy LGMRES algorithm.

DEFAULTSettings#

alias of LGMRES_Settings

Settings LGMRES_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, inner_m=30, outer_k=3, outer_v=None, store_outer_Av=True, prepend_outer_v=False)[source]#

Bases: BaseSciPyLinalgSettingsBase

The settings of the SciPy LGMRES 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:
Return type:

None

inner_m: PositiveInt = 30#

Number of inner GMRES iterations per each outer iteration.

Constraints:
  • gt = 0

outer_k: PositiveInt = 3#

Number of vectors to carry between inner GMRES iterations.

Constraints:
  • gt = 0

outer_v: list[tuple[NumberArray, NumberArray]] [Optional]#

List of tuples (v, Av) used to augment the Krylov subspace.

prepend_outer_v: bool = False#

Whether to put outer_v augmentation vectors before Krylov iterates.

store_outer_Av: bool = True#

Whether A @ v should be additionnaly stored in outer_v list.

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