gemseo.formulations.idf_settings module#

Settings of the IDF formulation.

Settings IDF_Settings(*, differentiated_input_names_substitute=(), normalize_constraints=True, n_processes=1, use_threading=True, start_at_equilibrium=False, mda_chain_settings_for_start_at_equilibrium=None)[source]#

Bases: BaseFormulationSettings

Settings of the IDF formulation.

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:
  • differentiated_input_names_substitute (Sequence[str]) --

    By default it is set to ().

  • normalize_constraints (bool) --

    By default it is set to True.

  • n_processes (Annotated[int, Gt(gt=0)]) --

    By default it is set to 1.

  • use_threading (bool) --

    By default it is set to True.

  • start_at_equilibrium (bool) --

    By default it is set to False.

  • mda_chain_settings_for_start_at_equilibrium (Mapping[str, Any] | MDAChain_Settings)

Return type:

None

mda_chain_settings_for_start_at_equilibrium: StrKeyMapping | MDAChain_Settings [Optional]#

The settings for the MDA when start_at_equilibrium=True.

See detailed settings in MDAChain.

n_processes: PositiveInt = 1#

The maximum simultaneous number of threads if use_threading is True, or processes otherwise, used to parallelize the execution.

Constraints:
  • gt = 0

normalize_constraints: bool = True#

Whether the outputs of the coupling consistency constraints are scaled.

start_at_equilibrium: bool = False#

Whether an MDA is used to initialize the coupling variables.

use_threading: bool = True#

Whether to use threads instead of processes to parallelize the execution; multiprocessing will copy (serialize) all the disciplines, while threading will share all the memory. This is important to note if you want to execute the same discipline multiple times, you shall use multiprocessing.

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