MDA algorithms

Warning

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

Note

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

MDAChain

Module: gemseo.mda.mda_chain

Required parameters
  • disciplines : Sequence[MDODiscipline]

    The disciplines from which to compute the MDA.

  • name : str

    The name to be given to the MDA. If None, use the name of the class.

Optional parameters
  • chain_linearize : 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 : MDOCouplingStructure | None, optional

    The coupling structure to be used by the MDA. If None, it is created from disciplines.

    By default it is set to None.

  • grammar_type : MDODiscipline.GrammarType, optional

    The type of the input and output grammars.

    By default it is set to JSONGrammar.

  • initialize_defaults : 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 : str, optional

    The class name of the inner-MDA.

    By default it is set to MDAJacobi.

  • linear_solver : str, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_options : StrKeyMapping | None, optional

    The options passed to the linear solver factory.

    By default it is set to None.

  • linear_solver_tolerance : float, optional

    The tolerance of the linear solver in the adjoint equation.

    By default it is set to 1e-12.

  • log_convergence : bool, optional

    Whether to log the MDA convergence, expressed in terms of normed residuals.

    By default it is set to False.

  • max_mda_iter : int, optional

    The maximum iterations number for the MDA algorithm.

    By default it is set to 20.

  • mdachain_parallel_options : Mapping[str, int | bool] | None, optional

    The options of the MDOParallelChain instances, if any.

    By default it is set to None.

  • mdachain_parallelize_tasks : bool, optional

    Whether to parallelize the parallel tasks, if any.

    By default it is set to False.

  • n_processes : int, optional

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

    By default it is set to 2.

  • sub_coupling_structures : Iterable[MDOCouplingStructure | None] | None, optional

    The coupling structures to be used by the inner-MDAs. If None, they are created from the sub-disciplines.

    By default it is set to None.

  • tolerance : float, optional

    The tolerance of the iterative direct coupling solver; the norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating.

    By default it is set to 1e-06.

  • use_lu_fact : bool, optional

    Whether to store a LU factorization of the matrix when using adjoint/forward differentiation. to solve faster multiple RHS problem.

    By default it is set to False.

  • **inner_mda_options : float | int | bool | str | None

    The options of the inner-MDAs.

MDAGSNewton

Module: gemseo.mda.sequential_mda

Required parameters
  • disciplines : Sequence[MDODiscipline]

    The disciplines from which to compute the MDA.

  • name : str

    The name to be given to the MDA. If None, use the name of the class.

Optional parameters
  • coupling_structure : MDOCouplingStructure | None, optional

    The coupling structure to be used by the MDA. If None, it is created from disciplines.

    By default it is set to None.

  • grammar_type : MDODiscipline.GrammarType, optional

    The type of the input and output grammars.

    By default it is set to JSONGrammar.

  • linear_solver : str, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_options : StrKeyMapping | None, optional

    The options passed to the linear solver factory.

    By default it is set to None.

  • linear_solver_tolerance : float, optional

    The tolerance of the linear solver in the adjoint equation.

    By default it is set to 1e-12.

  • log_convergence : bool, optional

    Whether to log the MDA convergence, expressed in terms of normed residuals.

    By default it is set to False.

  • max_mda_iter : int, optional

    The maximum iterations number for the MDA algorithm.

    By default it is set to 10.

  • max_mda_iter_gs : int, optional

    The maximum number of iterations of the Gauss-Seidel MDA.

    By default it is set to 3.

  • relax_factor : float, optional

    The relaxation factor.

    By default it is set to 0.99.

  • tolerance : float, optional

    The tolerance of the iterative direct coupling solver; the norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating.

    By default it is set to 1e-06.

  • use_lu_fact : bool, optional

    Whether to store a LU factorization of the matrix when using adjoint/forward differentiation. to solve faster multiple RHS problem.

    By default it is set to False.

  • warm_start : bool, optional

    Whether the second iteration and ongoing start from the previous coupling solution.

    By default it is set to False.

  • **newton_mda_options : float | str | None

    The options for the Newton MDA.

MDAGaussSeidel

Module: gemseo.mda.gauss_seidel

Required parameters
  • disciplines : Sequence[MDODiscipline]

    The disciplines from which to compute the MDA.

  • name : str

    The name to be given to the MDA. If None, use the name of the class.

Optional parameters
  • acceleration_method : AccelerationMethod, optional

    The acceleration method to be used to improve the convergence rate of the fixed point iteration method.

    By default it is set to NoTransformation.

  • coupling_structure : MDOCouplingStructure | None, optional

    The coupling structure to be used by the MDA. If None, it is created from disciplines.

    By default it is set to None.

  • grammar_type : MDODiscipline.GrammarType, optional

    The type of the input and output grammars.

    By default it is set to JSONGrammar.

  • linear_solver : str, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_options : StrKeyMapping | None, optional

    The options passed to the linear solver factory.

    By default it is set to None.

  • linear_solver_tolerance : float, optional

    The tolerance of the linear solver in the adjoint equation.

    By default it is set to 1e-12.

  • log_convergence : bool, optional

    Whether to log the MDA convergence, expressed in terms of normed residuals.

    By default it is set to False.

  • max_mda_iter : int, optional

    The maximum iterations number for the MDA algorithm.

    By default it is set to 10.

  • over_relaxation_factor : float, optional

    The over-relaxation factor.

    By default it is set to 1.0.

  • tolerance : float, optional

    The tolerance of the iterative direct coupling solver; the norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating.

    By default it is set to 1e-06.

  • use_lu_fact : bool, optional

    Whether to store a LU factorization of the matrix when using adjoint/forward differentiation. to solve faster multiple RHS problem.

    By default it is set to False.

  • warm_start : bool, optional

    Whether the second iteration and ongoing start from the previous coupling solution.

    By default it is set to False.

MDAJacobi

Module: gemseo.mda.jacobi

Required parameters
  • disciplines : Sequence[MDODiscipline]

    The disciplines from which to compute the MDA.

  • name : str

    The name to be given to the MDA. If None, use the name of the class.

Optional parameters
  • acceleration_method : AccelerationMethod, optional

    The acceleration method to be used to improve the convergence rate of the fixed point iteration method.

    By default it is set to Alternate2Delta.

  • coupling_structure : MDOCouplingStructure | None, optional

    The coupling structure to be used by the MDA. If None, it is created from disciplines.

    By default it is set to None.

  • grammar_type : MDODiscipline.GrammarType, optional

    The type of the input and output grammars.

    By default it is set to JSONGrammar.

  • linear_solver : str, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_options : StrKeyMapping | None, optional

    The options passed to the linear solver factory.

    By default it is set to None.

  • linear_solver_tolerance : float, optional

    The tolerance of the linear solver in the adjoint equation.

    By default it is set to 1e-12.

  • log_convergence : bool, optional

    Whether to log the MDA convergence, expressed in terms of normed residuals.

    By default it is set to False.

  • max_mda_iter : int, optional

    The maximum iterations number for the MDA algorithm.

    By default it is set to 10.

  • n_processes : int, optional

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

    By default it is set to 2.

  • over_relaxation_factor : float, optional

    The over-relaxation factor.

    By default it is set to 1.0.

  • tolerance : float, optional

    The tolerance of the iterative direct coupling solver; the norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating.

    By default it is set to 1e-06.

  • use_lu_fact : bool, optional

    Whether to store a LU factorization of the matrix when using adjoint/forward differentiation. to solve faster multiple RHS problem.

    By default it is set to False.

  • use_threading : bool, optional

    Whether to use threads instead of processes to parallelize the execution. Processes will copy (serialize) all the disciplines, while threads will share all the memory. If one wants to execute the same discipline multiple times then multiprocessing should be prefered.

    By default it is set to True.

  • warm_start : bool, optional

    Whether the second iteration and ongoing start from the previous coupling solution.

    By default it is set to False.

MDANewtonRaphson

Module: gemseo.mda.newton_raphson

Required parameters
  • disciplines : Sequence[MDODiscipline]

    The disciplines from which to compute the MDA.

  • name : str

    The name to be given to the MDA. If None, use the name of the class.

Optional parameters
  • acceleration_method : AccelerationMethod, optional

    The acceleration method to be used to improve the convergence rate of the fixed point iteration method.

    By default it is set to NoTransformation.

  • coupling_structure : MDOCouplingStructure | None, optional

    The coupling structure to be used by the MDA. If None, it is created from disciplines.

    By default it is set to None.

  • grammar_type : MDODiscipline.GrammarType, optional

    The type of the input and output grammars.

    By default it is set to JSONGrammar.

  • linear_solver : str, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_options : StrKeyMapping | None, optional

    The options passed to the linear solver factory.

    By default it is set to None.

  • linear_solver_tolerance : float, optional

    The tolerance of the linear solver in the adjoint equation.

    By default it is set to 1e-12.

  • log_convergence : bool, optional

    Whether to log the MDA convergence, expressed in terms of normed residuals.

    By default it is set to False.

  • max_mda_iter : int, optional

    The maximum iterations number for the MDA algorithm.

    By default it is set to 10.

  • n_processes : int, optional

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

    By default it is set to 2.

  • newton_linear_solver_name : NewtonLinearSolver, optional

    The name of the linear solver for the Newton method.

    By default it is set to DEFAULT.

  • newton_linear_solver_options : StrKeyMapping | None, optional

    The options for the Newton linear solver.

    By default it is set to None.

  • over_relaxation_factor : float, optional

    The over-relaxation factor.

    By default it is set to 0.99.

  • parallel : bool, optional

    Whether to execute and linearize the disciplines in parallel.

    By default it is set to False.

  • tolerance : float, optional

    The tolerance of the iterative direct coupling solver; the norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating.

    By default it is set to 1e-06.

  • use_lu_fact : bool, optional

    Whether to store a LU factorization of the matrix when using adjoint/forward differentiation. to solve faster multiple RHS problem.

    By default it is set to False.

  • use_threading : bool, optional

    Whether to use threads instead of processes to parallelize the execution. Processes will copy (serialize) all the disciplines, while threads will share all 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 : bool, optional

    Whether the second iteration and ongoing start from the previous coupling solution.

    By default it is set to False.

MDAQuasiNewton

Module: gemseo.mda.quasi_newton

Required parameters
  • disciplines : Sequence[MDODiscipline]

    The disciplines from which to compute the MDA.

  • name : str

    The name to be given to the MDA. If None, use the name of the class.

Optional parameters
  • coupling_structure : MDOCouplingStructure | None, optional

    The coupling structure to be used by the MDA. If None, it is created from disciplines.

    By default it is set to None.

  • grammar_type : MDODiscipline.GrammarType, optional

    The type of the input and output grammars.

    By default it is set to JSONGrammar.

  • linear_solver : str, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_options : StrKeyMapping | None, optional

    The options passed to the linear solver factory.

    By default it is set to None.

  • linear_solver_tolerance : float, optional

    The tolerance of the linear solver in the adjoint equation.

    By default it is set to 1e-12.

  • max_mda_iter : int, optional

    The maximum iterations number for the MDA algorithm.

    By default it is set to 10.

  • method : QuasiNewtonMethod, optional

    The name of the method in scipy root finding.

    By default it is set to hybr.

  • tolerance : float, optional

    The tolerance of the iterative direct coupling solver; the norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating.

    By default it is set to 1e-06.

  • use_gradient : bool, optional

    Whether to use the analytic gradient of the discipline.

    By default it is set to False.

  • use_lu_fact : bool, optional

    Whether to store a LU factorization of the matrix when using adjoint/forward differentiation. to solve faster multiple RHS problem.

    By default it is set to False.

  • warm_start : bool, optional

    Whether the second iteration and ongoing start from the previous coupling solution.

    By default it is set to False.

MDASequential

Module: gemseo.mda.sequential_mda

Required parameters
  • disciplines : Sequence[MDODiscipline]

    The disciplines from which to compute the MDA.

  • mda_sequence : Sequence[BaseMDA]

    The sequence of MDAs.

  • name : str

    The name to be given to the MDA. If None, use the name of the class.

Optional parameters
  • coupling_structure : MDOCouplingStructure | None, optional

    The coupling structure to be used by the MDA. If None, it is created from disciplines.

    By default it is set to None.

  • grammar_type : MDODiscipline.GrammarType, optional

    The type of the input and output grammars.

    By default it is set to JSONGrammar.

  • linear_solver : str, optional

    The name of the linear solver.

    By default it is set to DEFAULT.

  • linear_solver_options : StrKeyMapping | None, optional

    The options passed to the linear solver factory.

    By default it is set to None.

  • linear_solver_tolerance : float, optional

    The tolerance of the linear solver in the adjoint equation.

    By default it is set to 1e-12.

  • max_mda_iter : int, optional

    The maximum iterations number for the MDA algorithm.

    By default it is set to 10.

  • tolerance : float, optional

    The tolerance of the iterative direct coupling solver; the norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating.

    By default it is set to 1e-06.

  • use_lu_fact : bool, optional

    Whether to store a LU factorization of the matrix when using adjoint/forward differentiation. to solve faster multiple RHS problem.

    By default it is set to False.

  • warm_start : bool, optional

    Whether the second iteration and ongoing start from the previous coupling solution.

    By default it is set to False.