gemseo.mda.mda_chain_settings module#
Settings for MDAChain.
- Settings MDAChain_Settings(*, coupling_structure=None, linear_solver=LinearSolver.DEFAULT, linear_solver_settings=None, linear_solver_tolerance=1e-12, log_convergence=False, max_mda_iter=20, name='', tolerance=1e-06, use_lu_fact=False, warm_start=False, acceleration_method=AccelerationMethod.NONE, over_relaxation_factor=1.0, n_processes=2, use_threading=True, chain_linearize=False, inner_mda_name='MDAJacobi', inner_mda_settings=None, initialize_defaults=False, mdachain_parallel_settings=None, mdachain_parallelize_tasks=False, sub_coupling_structures=None)[source]#
Bases:
BaseParallelMDASettings
,ComposedMDASettings
The settings for
MDAChain
.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)
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.
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.
acceleration_method (AccelerationMethod) --
By default it is set to "NoTransformation".
over_relaxation_factor (Annotated[float, Le(le=2.0), Ge(ge=0)]) --
By default it is set to 1.0.
n_processes (Annotated[int, Gt(gt=0)]) --
By default it is set to 2.
use_threading (bool) --
By default it is set to True.
chain_linearize (bool) --
By default it is set to False.
inner_mda_name (str) --
By default it is set to "MDAJacobi".
inner_mda_settings (Mapping[str, Any] | BaseMDASettings)
initialize_defaults (bool) --
By default it is set to False.
mdachain_parallelize_tasks (bool) --
By default it is set to False.
sub_coupling_structures (Sequence[CouplingStructure])
- Return type:
None
- chain_linearize: bool = False#
Whether to linearize the chain of execution.
Otherwise, linearize the overall MDA with base class method. This last option is preferred to minimize computations in adjoint mode, while in direct mode, linearizing the chain may be cheaper.
- initialize_defaults: bool = False#
Whether to create a
MDOInitializationChain
to compute the eventually missingdefault_inputs
at the first execution.
- inner_mda_settings: StrKeyMapping | BaseMDASettings [Optional]#
The settings for the inner MDAs.
- mdachain_parallel_settings: StrKeyMapping [Optional]#
The settings of the MDOParallelChain instances, if any.
- sub_coupling_structures: Sequence[CouplingStructure] [Optional]#
The coupling structures to be used by the inner MDAs.
If empty, they are created from
disciplines
.
- model_post_init(context, /)#
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that's what pydantic-core passes when calling it.
- Parameters:
self (BaseModel) -- The BaseModel instance.
context (Any) -- The context.
- Return type:
None