MDA algorithms#

Warning

Some capabilities may require the installation of GEMSEO with all its features and some others may depend on plugins.

Warning

All the features of the wrapped libraries may not be exposed through GEMSEO.

Note

The algorithm settings can be passed to a function of the form

function(..., settings_model: AlgorithmSettings | None = None, **settings: Any)

either one by one:

function(..., setting_name_1=setting_name_1, setting_name_2=setting_name_2, ...)

or using the argument name "settings_model" and the Pydantic model associated with the algorithm:

settings_model = AlgorithmSettings(setting_name_1=setting_name_1, setting_name_2=setting_name_2, ...)
function(..., settings_model=settings_model)

MDAChain#

Module: gemseo.mda.mda_chain

Pydantic model of the settings for MDAChain#
from gemseo.settings.mda import MDAChain_Settings
Optional settings
  • acceleration_method : <enum 'AccelerationMethod'>, optional

    The acceleration method used within the fixed point iterations.

    By default it is set to NoTransformation.

  • chain_linearize : <class 'bool'>, optional

    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.

    By default it is set to False.

  • coupling_structure : typing.Optional[gemseo.core.coupling_structure.CouplingStructure], optional

    The coupling structure to be used by the MDA.

    If None, the coupling structure is created from the disciplines.

    By default it is set to None.

  • initialize_defaults : <class 'bool'>, optional

    Whether to create a MDOInitializationChain to compute the eventually missing default_inputs at the first execution.

    By default it is set to False.

  • inner_mda_name : <class 'str'>, optional

    The class name of the inner-MDA.

    By default it is set to MDAJacobi.

  • inner_mda_settings : typing.Union[collections.abc.Mapping[str, typing.Any], gemseo.mda.base_mda_settings.BaseMDASettings], optional

    The settings for the inner MDAs.

    By default it is set to {}.

  • linear_solver : <enum 'LinearSolver'>, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_settings : typing.Union[collections.abc.Mapping[str, typing.Any], gemseo.algos.linear_solvers.base_linear_solver_settings.BaseLinearSolverSettings], optional

    The settings passed to the linear solver factory.

    By default it is set to {}.

  • linear_solver_tolerance : <class 'float'>, optional

    The linear solver tolerance.

    Linear solvers are used to compute the total derivatives.

    By default it is set to 1e-12.

  • log_convergence : <class 'bool'>, optional

    Whether to log the MDA convergence.

    The log displays the normalized residual norm.

    By default it is set to False.

  • max_mda_iter : <class 'int'>, optional

    The maximum number of iterations for the MDA algorithm.

    If 0, evaluate the coupling variables without trying to solve the coupling equations.

    By default it is set to 20.

  • mdachain_parallel_settings : collections.abc.Mapping[str, typing.Any], optional

    The settings of the MDOParallelChain instances, if any.

    By default it is set to {}.

  • mdachain_parallelize_tasks : <class 'bool'>, optional

    Whether to parallelize tasks, if relevant.

    By default it is set to False.

  • n_processes : <class 'int'>, optional

    The number of threads/processes.

    Threads if use_threading, processes otherwise.

    By default it is set to 2.

  • name : <class 'str'>

    The name to be given to the MDA.

    If empty, use the name of the class.

    By default it is set to .

  • over_relaxation_factor : <class 'float'>, optional

    The over-relaxation factor.

    By default it is set to 1.0.

  • sub_coupling_structures : collections.abc.Sequence[gemseo.core.coupling_structure.CouplingStructure], optional

    The coupling structures to be used by the inner MDAs.

    If empty, they are created from disciplines.

    By default it is set to ().

  • tolerance : <class 'float'>, optional

    The tolerance for the MDA algorithm residual.

    The available normalization strategies for the residual are described in BaseMDA.ResidualScaling.

    By default it is set to 1e-06.

  • use_lu_fact : <class 'bool'>, optional

    Whether to perform an LU factorization.

    The factorization is used to solve the linear systems arising in the computation of the total derivatives. Since there are possibly several right-hand side, if affordable, such a factorization may improve the solution time.

    By default it is set to False.

  • use_threading : <class 'bool'>, optional

    Whether to use threads instead of processes to parallelize the execution.

    Processes will copy (serialize) the disciplines, while threads will share the memory. If one wants to execute the same discipline multiple times, then multiprocessing should be preferred.

    By default it is set to True.

  • warm_start : <class 'bool'>, optional

    Whether to warm start the execution of the MDA algorithm.

    The warm start strategy consists in using the last cached values for the coupling variables as an initial guess. This is expected to reduce the number of iteration of the MDA algorithm required to reach convergence.

    By default it is set to False.

MDAGSNewton#

Module: gemseo.mda.gs_newton

Pydantic model of the settings for MDAGSNewton#
from gemseo.settings.mda import MDAGSNewton_Settings
Optional settings
  • coupling_structure : typing.Optional[gemseo.core.coupling_structure.CouplingStructure], optional

    The coupling structure to be used by the MDA.

    If None, the coupling structure is created from the disciplines.

    By default it is set to None.

  • linear_solver : <enum 'LinearSolver'>, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_settings : typing.Union[collections.abc.Mapping[str, typing.Any], gemseo.algos.linear_solvers.base_linear_solver_settings.BaseLinearSolverSettings], optional

    The settings passed to the linear solver factory.

    By default it is set to {}.

  • linear_solver_tolerance : <class 'float'>, optional

    The linear solver tolerance.

    Linear solvers are used to compute the total derivatives.

    By default it is set to 1e-12.

  • log_convergence : <class 'bool'>, optional

    Whether to log the MDA convergence.

    The log displays the normalized residual norm.

    By default it is set to False.

  • max_mda_iter : <class 'int'>, optional

    The maximum number of iterations for the MDA algorithm.

    If 0, evaluate the coupling variables without trying to solve the coupling equations.

    By default it is set to 20.

  • name : <class 'str'>

    The name to be given to the MDA.

    If empty, use the name of the class.

    By default it is set to .

  • tolerance : <class 'float'>, optional

    The tolerance for the MDA algorithm residual.

    The available normalization strategies for the residual are described in BaseMDA.ResidualScaling.

    By default it is set to 1e-06.

  • use_lu_fact : <class 'bool'>, optional

    Whether to perform an LU factorization.

    The factorization is used to solve the linear systems arising in the computation of the total derivatives. Since there are possibly several right-hand side, if affordable, such a factorization may improve the solution time.

    By default it is set to False.

  • warm_start : <class 'bool'>, optional

    Whether to warm start the execution of the MDA algorithm.

    The warm start strategy consists in using the last cached values for the coupling variables as an initial guess. This is expected to reduce the number of iteration of the MDA algorithm required to reach convergence.

    By default it is set to False.

MDAGaussSeidel#

Module: gemseo.mda.gauss_seidel

Pydantic model of the settings for MDAGaussSeidel#
from gemseo.settings.mda import MDAGaussSeidel_Settings
Optional settings
  • acceleration_method : <enum 'AccelerationMethod'>, optional

    The acceleration method used within the fixed point iterations.

    By default it is set to NoTransformation.

  • coupling_structure : typing.Optional[gemseo.core.coupling_structure.CouplingStructure], optional

    The coupling structure to be used by the MDA.

    If None, the coupling structure is created from the disciplines.

    By default it is set to None.

  • linear_solver : <enum 'LinearSolver'>, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_settings : typing.Union[collections.abc.Mapping[str, typing.Any], gemseo.algos.linear_solvers.base_linear_solver_settings.BaseLinearSolverSettings], optional

    The settings passed to the linear solver factory.

    By default it is set to {}.

  • linear_solver_tolerance : <class 'float'>, optional

    The linear solver tolerance.

    Linear solvers are used to compute the total derivatives.

    By default it is set to 1e-12.

  • log_convergence : <class 'bool'>, optional

    Whether to log the MDA convergence.

    The log displays the normalized residual norm.

    By default it is set to False.

  • max_mda_iter : <class 'int'>, optional

    The maximum number of iterations for the MDA algorithm.

    If 0, evaluate the coupling variables without trying to solve the coupling equations.

    By default it is set to 20.

  • name : <class 'str'>

    The name to be given to the MDA.

    If empty, use the name of the class.

    By default it is set to .

  • over_relaxation_factor : <class 'float'>, optional

    The over-relaxation factor.

    By default it is set to 1.0.

  • tolerance : <class 'float'>, optional

    The tolerance for the MDA algorithm residual.

    The available normalization strategies for the residual are described in BaseMDA.ResidualScaling.

    By default it is set to 1e-06.

  • use_lu_fact : <class 'bool'>, optional

    Whether to perform an LU factorization.

    The factorization is used to solve the linear systems arising in the computation of the total derivatives. Since there are possibly several right-hand side, if affordable, such a factorization may improve the solution time.

    By default it is set to False.

  • warm_start : <class 'bool'>, optional

    Whether to warm start the execution of the MDA algorithm.

    The warm start strategy consists in using the last cached values for the coupling variables as an initial guess. This is expected to reduce the number of iteration of the MDA algorithm required to reach convergence.

    By default it is set to False.

MDAJacobi#

Module: gemseo.mda.jacobi

Pydantic model of the settings for MDAJacobi#
from gemseo.settings.mda import MDAJacobi_Settings
Optional settings
  • acceleration_method : <enum 'AccelerationMethod'>, optional

    The acceleration method used within the fixed point iterations.

    By default it is set to Alternate2Delta.

  • coupling_structure : typing.Optional[gemseo.core.coupling_structure.CouplingStructure], optional

    The coupling structure to be used by the MDA.

    If None, the coupling structure is created from the disciplines.

    By default it is set to None.

  • linear_solver : <enum 'LinearSolver'>, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_settings : typing.Union[collections.abc.Mapping[str, typing.Any], gemseo.algos.linear_solvers.base_linear_solver_settings.BaseLinearSolverSettings], optional

    The settings passed to the linear solver factory.

    By default it is set to {}.

  • linear_solver_tolerance : <class 'float'>, optional

    The linear solver tolerance.

    Linear solvers are used to compute the total derivatives.

    By default it is set to 1e-12.

  • log_convergence : <class 'bool'>, optional

    Whether to log the MDA convergence.

    The log displays the normalized residual norm.

    By default it is set to False.

  • max_mda_iter : <class 'int'>, optional

    The maximum number of iterations for the MDA algorithm.

    If 0, evaluate the coupling variables without trying to solve the coupling equations.

    By default it is set to 20.

  • n_processes : <class 'int'>, optional

    The number of threads/processes.

    Threads if use_threading, processes otherwise.

    By default it is set to 2.

  • name : <class 'str'>

    The name to be given to the MDA.

    If empty, use the name of the class.

    By default it is set to .

  • over_relaxation_factor : <class 'float'>, optional

    The over-relaxation factor.

    By default it is set to 1.0.

  • tolerance : <class 'float'>, optional

    The tolerance for the MDA algorithm residual.

    The available normalization strategies for the residual are described in BaseMDA.ResidualScaling.

    By default it is set to 1e-06.

  • use_lu_fact : <class 'bool'>, optional

    Whether to perform an LU factorization.

    The factorization is used to solve the linear systems arising in the computation of the total derivatives. Since there are possibly several right-hand side, if affordable, such a factorization may improve the solution time.

    By default it is set to False.

  • use_threading : <class 'bool'>, optional

    Whether to use threads instead of processes to parallelize the execution.

    Processes will copy (serialize) the disciplines, while threads will share the memory. If one wants to execute the same discipline multiple times, then multiprocessing should be preferred.

    By default it is set to True.

  • warm_start : <class 'bool'>, optional

    Whether to warm start the execution of the MDA algorithm.

    The warm start strategy consists in using the last cached values for the coupling variables as an initial guess. This is expected to reduce the number of iteration of the MDA algorithm required to reach convergence.

    By default it is set to False.

MDANewtonRaphson#

Module: gemseo.mda.newton_raphson

Pydantic model of the settings for MDANewtonRaphson#
from gemseo.settings.mda import MDANewtonRaphson_Settings
Optional settings
  • acceleration_method : <enum 'AccelerationMethod'>, optional

    The acceleration method used within the fixed point iterations.

    By default it is set to NoTransformation.

  • coupling_structure : typing.Optional[gemseo.core.coupling_structure.CouplingStructure], optional

    The coupling structure to be used by the MDA.

    If None, the coupling structure is created from the disciplines.

    By default it is set to None.

  • execute_before_linearizing : <class 'bool'>, optional

    Whether to start by executing the disciplines before linearizing.

    This ensures that the discipline are executed and linearized with the same input data. It can be almost free if the corresponding output data have been stored in the BaseMDA.cache.

    By default it is set to False.

  • linear_solver : <enum 'LinearSolver'>, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_settings : typing.Union[collections.abc.Mapping[str, typing.Any], gemseo.algos.linear_solvers.base_linear_solver_settings.BaseLinearSolverSettings], optional

    The settings passed to the linear solver factory.

    By default it is set to {}.

  • linear_solver_tolerance : <class 'float'>, optional

    The linear solver tolerance.

    Linear solvers are used to compute the total derivatives.

    By default it is set to 1e-12.

  • log_convergence : <class 'bool'>, optional

    Whether to log the MDA convergence.

    The log displays the normalized residual norm.

    By default it is set to False.

  • max_mda_iter : <class 'int'>, optional

    The maximum number of iterations for the MDA algorithm.

    If 0, evaluate the coupling variables without trying to solve the coupling equations.

    By default it is set to 20.

  • n_processes : <class 'int'>, optional

    The number of threads/processes.

    Threads if use_threading, processes otherwise.

    By default it is set to 2.

  • name : <class 'str'>

    The name to be given to the MDA.

    If empty, use the name of the class.

    By default it is set to .

  • newton_linear_solver_name : <enum 'LinearSolver'>, optional

    The name of the linear solver for the Newton method.

    By default it is set to DEFAULT.

  • newton_linear_solver_settings : typing.Union[collections.abc.Mapping[str, typing.Any], gemseo.algos.linear_solvers.base_linear_solver_settings.BaseLinearSolverSettings], optional

    The settings for the Newton linear solver.

    By default it is set to {}.

  • over_relaxation_factor : <class 'float'>, optional

    The over-relaxation factor.

    By default it is set to 1.0.

  • tolerance : <class 'float'>, optional

    The tolerance for the MDA algorithm residual.

    The available normalization strategies for the residual are described in BaseMDA.ResidualScaling.

    By default it is set to 1e-06.

  • use_lu_fact : <class 'bool'>, optional

    Whether to perform an LU factorization.

    The factorization is used to solve the linear systems arising in the computation of the total derivatives. Since there are possibly several right-hand side, if affordable, such a factorization may improve the solution time.

    By default it is set to False.

  • use_threading : <class 'bool'>, optional

    Whether to use threads instead of processes to parallelize the execution.

    Processes will copy (serialize) the disciplines, while threads will share the memory. If one wants to execute the same discipline multiple times, then multiprocessing should be preferred.

    By default it is set to True.

  • warm_start : <class 'bool'>, optional

    Whether to warm start the execution of the MDA algorithm.

    The warm start strategy consists in using the last cached values for the coupling variables as an initial guess. This is expected to reduce the number of iteration of the MDA algorithm required to reach convergence.

    By default it is set to False.

MDAQuasiNewton#

Module: gemseo.mda.quasi_newton

Pydantic model of the settings for MDAQuasiNewton#
from gemseo.settings.mda import MDAQuasiNewton_Settings
Optional settings
  • acceleration_method : <enum 'AccelerationMethod'>, optional

    The acceleration method used within the fixed point iterations.

    By default it is set to NoTransformation.

  • coupling_structure : typing.Optional[gemseo.core.coupling_structure.CouplingStructure], optional

    The coupling structure to be used by the MDA.

    If None, the coupling structure is created from the disciplines.

    By default it is set to None.

  • execute_before_linearizing : <class 'bool'>, optional

    Whether to start by executing the disciplines before linearizing.

    This ensures that the discipline are executed and linearized with the same input data. It can be almost free if the corresponding output data have been stored in the BaseMDA.cache.

    By default it is set to True.

  • linear_solver : <enum 'LinearSolver'>, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_settings : typing.Union[collections.abc.Mapping[str, typing.Any], gemseo.algos.linear_solvers.base_linear_solver_settings.BaseLinearSolverSettings], optional

    The settings passed to the linear solver factory.

    By default it is set to {}.

  • linear_solver_tolerance : <class 'float'>, optional

    The linear solver tolerance.

    Linear solvers are used to compute the total derivatives.

    By default it is set to 1e-12.

  • log_convergence : <class 'bool'>, optional

    Whether to log the MDA convergence.

    The log displays the normalized residual norm.

    By default it is set to False.

  • max_mda_iter : <class 'int'>, optional

    The maximum number of iterations for the MDA algorithm.

    If 0, evaluate the coupling variables without trying to solve the coupling equations.

    By default it is set to 20.

  • method : <enum 'QuasiNewtonMethod'>, optional

    The name of the quasi-Newton method.

    By default it is set to hybr.

  • n_processes : <class 'int'>, optional

    The number of threads/processes.

    Threads if use_threading, processes otherwise.

    By default it is set to 2.

  • name : <class 'str'>

    The name to be given to the MDA.

    If empty, use the name of the class.

    By default it is set to .

  • over_relaxation_factor : <class 'float'>, optional

    The over-relaxation factor.

    By default it is set to 1.0.

  • tolerance : <class 'float'>, optional

    The tolerance for the MDA algorithm residual.

    The available normalization strategies for the residual are described in BaseMDA.ResidualScaling.

    By default it is set to 1e-06.

  • use_gradient : <class 'bool'>, optional

    Whether to use the analytic gradient of the discipline.

    By default it is set to False.

  • use_lu_fact : <class 'bool'>, optional

    Whether to perform an LU factorization.

    The factorization is used to solve the linear systems arising in the computation of the total derivatives. Since there are possibly several right-hand side, if affordable, such a factorization may improve the solution time.

    By default it is set to False.

  • use_threading : <class 'bool'>, optional

    Whether to use threads instead of processes to parallelize the execution.

    Processes will copy (serialize) the disciplines, while threads will share the memory. If one wants to execute the same discipline multiple times, then multiprocessing should be preferred.

    By default it is set to True.

  • warm_start : <class 'bool'>, optional

    Whether to warm start the execution of the MDA algorithm.

    The warm start strategy consists in using the last cached values for the coupling variables as an initial guess. This is expected to reduce the number of iteration of the MDA algorithm required to reach convergence.

    By default it is set to False.

MDASequential#

Module: gemseo.mda.sequential_mda

Pydantic model of the settings for MDASequential#
from gemseo.settings.mda import MDASequential_Settings
Optional settings
  • coupling_structure : typing.Optional[gemseo.core.coupling_structure.CouplingStructure], optional

    The coupling structure to be used by the MDA.

    If None, the coupling structure is created from the disciplines.

    By default it is set to None.

  • linear_solver : <enum 'LinearSolver'>, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_settings : typing.Union[collections.abc.Mapping[str, typing.Any], gemseo.algos.linear_solvers.base_linear_solver_settings.BaseLinearSolverSettings], optional

    The settings passed to the linear solver factory.

    By default it is set to {}.

  • linear_solver_tolerance : <class 'float'>, optional

    The linear solver tolerance.

    Linear solvers are used to compute the total derivatives.

    By default it is set to 1e-12.

  • log_convergence : <class 'bool'>, optional

    Whether to log the MDA convergence.

    The log displays the normalized residual norm.

    By default it is set to False.

  • max_mda_iter : <class 'int'>, optional

    The maximum number of iterations for the MDA algorithm.

    If 0, evaluate the coupling variables without trying to solve the coupling equations.

    By default it is set to 20.

  • name : <class 'str'>

    The name to be given to the MDA.

    If empty, use the name of the class.

    By default it is set to .

  • tolerance : <class 'float'>, optional

    The tolerance for the MDA algorithm residual.

    The available normalization strategies for the residual are described in BaseMDA.ResidualScaling.

    By default it is set to 1e-06.

  • use_lu_fact : <class 'bool'>, optional

    Whether to perform an LU factorization.

    The factorization is used to solve the linear systems arising in the computation of the total derivatives. Since there are possibly several right-hand side, if affordable, such a factorization may improve the solution time.

    By default it is set to False.

  • warm_start : <class 'bool'>, optional

    Whether to warm start the execution of the MDA algorithm.

    The warm start strategy consists in using the last cached values for the coupling variables as an initial guess. This is expected to reduce the number of iteration of the MDA algorithm required to reach convergence.

    By default it is set to False.