gemseo.mda.base_mda_settings module#
Settings for MDA algorithms.
- Settings BaseMDASettings(*, coupling_structure=None, linear_solver=LinearSolver.DEFAULT, linear_solver_settings=<factory>, linear_solver_tolerance=1e-12, log_convergence=False, max_mda_iter=20, max_consecutive_unsuccessful_iterations=8, name='', tolerance=1e-06, use_lu_fact=False, warm_start=False)[source]#
Bases:
BaseModel
The base settings class for MDA algorithms.
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:
coupling_structure (CouplingStructure | None)
linear_solver (LinearSolver) --
By default it is set to "DEFAULT".
linear_solver_settings (Mapping[str, Any] | BaseLinearSolverSettings) --
By default it is set to <factory>.
linear_solver_tolerance (Annotated[float, Ge(ge=0)]) --
By default it is set to 1e-12.
log_convergence (bool) --
By default it is set to False.
max_mda_iter (Annotated[int, Ge(ge=0)]) --
By default it is set to 20.
max_consecutive_unsuccessful_iterations (Annotated[int, Ge(ge=0)]) --
By default it is set to 8.
name (str) --
By default it is set to "".
tolerance (Annotated[float, Ge(ge=0)]) --
By default it is set to 1e-06.
use_lu_fact (bool) --
By default it is set to False.
warm_start (bool) --
By default it is set to False.
- Return type:
None
- coupling_structure: CouplingStructure | None = None#
The coupling structure to be used by the MDA.
If
None
, the coupling structure is created from the disciplines.
- linear_solver: LinearSolver = LinearSolver.DEFAULT#
The name of the linear solver.
- linear_solver_settings: StrKeyMapping | BaseLinearSolverSettings [Optional]#
The settings passed to the linear solver factory.
- linear_solver_tolerance: NonNegativeFloat = 1e-12#
The linear solver tolerance.
Linear solvers are used to compute the total derivatives.
- Constraints:
ge = 0
- log_convergence: bool = False#
Whether to log the MDA convergence.
The log displays the normalized residual norm.
- max_consecutive_unsuccessful_iterations: NonNegativeInt = 8#
The maximum number of consecutive unsuccessful iterations.
Iterations are considered unsuccessful if the normalized residual norm increases.
- Constraints:
ge = 0
- max_mda_iter: NonNegativeInt = 20#
The maximum number of iterations for the MDA algorithm.
If 0, evaluate the coupling variables without trying to solve the coupling equations.
- Constraints:
ge = 0
- tolerance: NonNegativeFloat = 1e-06#
The tolerance for the MDA algorithm residual.
The available normalization strategies for the residual are described in
BaseMDA.ResidualScaling
.- Constraints:
ge = 0
- class LinearSolver(*values)#
Bases:
StrEnum
- BICG = 'BICG'#
- BICGSTAB = 'BICGSTAB'#
- CG = 'CG'#
- CGS = 'CGS'#
- DEFAULT = 'DEFAULT'#
- GCROT = 'GCROT'#
- GMRES = 'GMRES'#
- LGMRES = 'LGMRES'#
- PETSC_BCGS = 'PETSC_BCGS'#
- PETSC_BCGSL = 'PETSC_BCGSL'#
- PETSC_BICG = 'PETSC_BICG'#
- PETSC_CG = 'PETSC_CG'#
- PETSC_CGLS = 'PETSC_CGLS'#
- PETSC_CGNE = 'PETSC_CGNE'#
- PETSC_CGS = 'PETSC_CGS'#
- PETSC_CHEBYSHEV = 'PETSC_CHEBYSHEV'#
- PETSC_CR = 'PETSC_CR'#
- PETSC_DGMRES = 'PETSC_DGMRES'#
- PETSC_FBCGS = 'PETSC_FBCGS'#
- PETSC_FBCGSR = 'PETSC_FBCGSR'#
- PETSC_FCG = 'PETSC_FCG'#
- PETSC_FETIDP = 'PETSC_FETIDP'#
- PETSC_FGMRES = 'PETSC_FGMRES'#
- PETSC_GCR = 'PETSC_GCR'#
- PETSC_GLTR = 'PETSC_GLTR'#
- PETSC_GMRES = 'PETSC_GMRES'#
- PETSC_GROPPCG = 'PETSC_GROPPCG'#
- PETSC_HPDDM = 'PETSC_HPDDM'#
- PETSC_IBCGS = 'PETSC_IBCGS'#
- PETSC_LCD = 'PETSC_LCD'#
- PETSC_LGMRES = 'PETSC_LGMRES'#
- PETSC_LSQR = 'PETSC_LSQR'#
- PETSC_MINRES = 'PETSC_MINRES'#
- PETSC_NASH = 'PETSC_NASH'#
- PETSC_PGMRES = 'PETSC_PGMRES'#
- PETSC_PIPEBCGS = 'PETSC_PIPEBCGS'#
- PETSC_PIPECG = 'PETSC_PIPECG'#
- PETSC_PIPECG2 = 'PETSC_PIPECG2'#
- PETSC_PIPECGRR = 'PETSC_PIPECGRR'#
- PETSC_PIPECR = 'PETSC_PIPECR'#
- PETSC_PIPEFCG = 'PETSC_PIPEFCG'#
- PETSC_PIPEFGMRES = 'PETSC_PIPEFGMRES'#
- PETSC_PIPEGCR = 'PETSC_PIPEGCR'#
- PETSC_PIPELCG = 'PETSC_PIPELCG'#
- PETSC_PIPEPRCG = 'PETSC_PIPEPRCG'#
- PETSC_PREONLY = 'PETSC_PREONLY'#
- PETSC_QCG = 'PETSC_QCG'#
- PETSC_RICHARDSON = 'PETSC_RICHARDSON'#
- PETSC_STCG = 'PETSC_STCG'#
- PETSC_SYMMLQ = 'PETSC_SYMMLQ'#
- PETSC_TCQMR = 'PETSC_TCQMR'#
- PETSC_TFQMR = 'PETSC_TFQMR'#
- PETSC_TSIRM = 'PETSC_TSIRM'#
- TFQMR = 'TFQMR'#