.. Copyright 2021 IRT Saint-Exupéry, https://www.irt-saintexupery.com This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. .. _gen_mda_algos: MDA algorithms ============== .. warning:: Some algorithms may require the :ref:`installation ` of |g| with :ref:`all its features ` and some others may depend on :ref:`plugins `. .. note:: All the features of the wrapped optimization libraries may not be exposed through |g|. .. raw:: html .. _GSNewtonMDA_options: GSNewtonMDA ----------- Module: :class:`gemseo.mda.sequential_mda` .. raw:: html
Required parameters
  • **disciplines** : *Sequence[MDODiscipline]* The disciplines from which to compute the MDA. .. raw:: html
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. .. raw:: html
  • **grammar_type** : *str, optional* The type of the input and output grammars, either :attr:`.MDODiscipline.JSON_GRAMMAR_TYPE` or :attr:`.MDODiscipline.SIMPLE_GRAMMAR_TYPE`. By default it is set to JSONGrammar. .. raw:: html
  • **linear_solver** : *str, optional* The type of linear solver to be used to solve the Newton problem. By default it is set to DEFAULT. .. raw:: html
  • **linear_solver_options** : *Mapping[str, Any], optional* The options passed to the linear solver factory. By default it is set to None. .. raw:: html
  • **linear_solver_tolerance** : *float, optional* The tolerance of the linear solver in the adjoint equation. By default it is set to 1e-12. .. raw:: html
  • **log_convergence** : *bool, optional* Whether to log the MDA convergence, expressed in terms of normed residuals. By default it is set to False. .. raw:: html
  • **max_mda_iter** : *int, optional* The maximum iterations number for the MDA algorithm. By default it is set to 10. .. raw:: html
  • **max_mda_iter_gs** : *int, optional* The maximum number of iterations of the Gauss-Seidel solver. By default it is set to 3. .. raw:: html
  • **name** : *str | None, optional* The name to be given to the MDA. If None, use the name of the class. By default it is set to None. .. raw:: html
  • **relax_factor** : *float, optional* The relaxation factor. By default it is set to 0.99. .. raw:: html
  • **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. .. raw:: html
  • **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. .. raw:: html
  • **warm_start** : *bool, optional* Whether the second iteration and ongoing start from the previous coupling solution. By default it is set to False. .. raw:: html
  • ****newton_mda_options** : *float* The options passed to :class:`.MDANewtonRaphson`. .. raw:: html
.. _MDAChain_options: MDAChain -------- Module: :class:`gemseo.mda.mda_chain` .. raw:: html
Required parameters
  • **disciplines** : *Sequence[MDODiscipline]* The disciplines from which to compute the MDA. .. raw:: html
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. .. raw:: html
  • **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. .. raw:: html
  • **grammar_type** : *str, optional* The type of the input and output grammars, either :attr:`.MDODiscipline.JSON_GRAMMAR_TYPE` or :attr:`.MDODiscipline.SIMPLE_GRAMMAR_TYPE`. By default it is set to JSONGrammar. .. raw:: html
  • **inner_mda_name** : *str, optional* The class name of the inner-MDA. By default it is set to MDAJacobi. .. raw:: html
  • **linear_solver** : *str, optional* The name of the linear solver. By default it is set to DEFAULT. .. raw:: html
  • **linear_solver_options** : *Mapping[str, Any], optional* The options passed to the linear solver factory. By default it is set to None. .. raw:: html
  • **linear_solver_tolerance** : *float, optional* The tolerance of the linear solver in the adjoint equation. By default it is set to 1e-12. .. raw:: html
  • **log_convergence** : *bool, optional* Whether to log the MDA convergence, expressed in terms of normed residuals. By default it is set to False. .. raw:: html
  • **max_mda_iter** : *int, optional* The maximum iterations number for the MDA algorithm. By default it is set to 20. .. raw:: html
  • **n_processes** : *int, optional* The maximum simultaneous number of threads, if ``use_threading`` is True, or processes otherwise, used to parallelize the execution. By default it is set to 2. .. raw:: html
  • **name** : *str | None, optional* The name to be given to the MDA. If None, use the name of the class. By default it is set to None. .. raw:: html
  • **sub_coupling_structures** : *Iterable[MDOCouplingStructure] | 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. .. raw:: html
  • **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. .. raw:: html
  • **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. .. raw:: html
  • ****inner_mda_options** : *float | int | bool | str | None* The options of the inner-MDAs. .. raw:: html
.. _MDAGaussSeidel_options: MDAGaussSeidel -------------- Module: :class:`gemseo.mda.gauss_seidel` .. raw:: html
Required parameters
  • **disciplines** : *Sequence[MDODiscipline]* The disciplines from which to compute the MDA. .. raw:: html
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. .. raw:: html
  • **grammar_type** : *str, optional* The type of the input and output grammars, either :attr:`.MDODiscipline.JSON_GRAMMAR_TYPE` or :attr:`.MDODiscipline.SIMPLE_GRAMMAR_TYPE`. By default it is set to JSONGrammar. .. raw:: html
  • **linear_solver** : *str, optional* The name of the linear solver. By default it is set to DEFAULT. .. raw:: html
  • **linear_solver_options** : *Mapping[str, Any], optional* The options passed to the linear solver factory. By default it is set to None. .. raw:: html
  • **linear_solver_tolerance** : *float, optional* The tolerance of the linear solver in the adjoint equation. By default it is set to 1e-12. .. raw:: html
  • **log_convergence** : *bool, optional* Whether to log the MDA convergence, expressed in terms of normed residuals. By default it is set to False. .. raw:: html
  • **max_mda_iter** : *int, optional* The maximum iterations number for the MDA algorithm. By default it is set to 10. .. raw:: html
  • **name** : *str | None, optional* The name to be given to the MDA. If None, use the name of the class. By default it is set to None. .. raw:: html
  • **over_relax_factor** : *float, optional* The relaxation coefficient, used to make the method more robust, if ``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. .. raw:: html
  • **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. .. raw:: html
  • **warm_start** : *bool, optional* Whether the second iteration and ongoing start from the previous coupling solution. By default it is set to False. .. raw:: html
.. _MDAJacobi_options: MDAJacobi --------- Module: :class:`gemseo.mda.jacobi` .. raw:: html
Required parameters
  • **disciplines** : *Sequence[MDODiscipline]* The disciplines from which to compute the MDA. .. raw:: html
Optional parameters
  • **acceleration** : *str, optional* The type of acceleration to be used to extrapolate the residuals and save CPU time by reusing the information from the last iterations, either ``None``, ``"m2d"``, or ``"secant"``, ``"m2d"`` is faster but uses the 2 last iterations. By default it is set to m2d. .. raw:: html
  • **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. .. raw:: html
  • **grammar_type** : *str, optional* The type of the input and output grammars, either :attr:`.MDODiscipline.JSON_GRAMMAR_TYPE` or :attr:`.MDODiscipline.SIMPLE_GRAMMAR_TYPE`. By default it is set to JSONGrammar. .. raw:: html
  • **linear_solver** : *str, optional* The name of the linear solver. By default it is set to DEFAULT. .. raw:: html
  • **linear_solver_options** : *Mapping[str, Any], optional* The options passed to the linear solver factory. By default it is set to None. .. raw:: html
  • **linear_solver_tolerance** : *float, optional* The tolerance of the linear solver in the adjoint equation. By default it is set to 1e-12. .. raw:: html
  • **log_convergence** : *bool, optional* Whether to log the MDA convergence, expressed in terms of normed residuals. By default it is set to False. .. raw:: html
  • **max_mda_iter** : *int, optional* The maximum iterations number for the MDA algorithm. By default it is set to 10. .. raw:: html
  • **n_processes** : *int, optional* The maximum simultaneous number of threads, if ``use_threading`` is True, or processes otherwise, used to parallelize the execution. By default it is set to 2. .. raw:: html
  • **name** : *str | None, optional* The name to be given to the MDA. If None, use the name of the class. By default it is set to None. .. raw:: html
  • **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. .. raw:: html
  • **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. .. raw:: html
  • **use_threading** : *bool, optional* 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. By default it is set to True. .. raw:: html
  • **warm_start** : *bool, optional* Whether the second iteration and ongoing start from the previous coupling solution. By default it is set to False. .. raw:: html
.. _MDANewtonRaphson_options: MDANewtonRaphson ---------------- Module: :class:`gemseo.mda.newton` .. raw:: html
Required parameters
  • **disciplines** : *Sequence[MDODiscipline]* The disciplines from which to compute the MDA. .. raw:: html
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. .. raw:: html
  • **grammar_type** : *str, optional* The type of the input and output grammars, either :attr:`.MDODiscipline.JSON_GRAMMAR_TYPE` or :attr:`.MDODiscipline.SIMPLE_GRAMMAR_TYPE`. By default it is set to JSONGrammar. .. raw:: html
  • **linear_solver** : *str, optional* The name of the linear solver. By default it is set to DEFAULT. .. raw:: html
  • **linear_solver_options** : *Mapping[str, Any], optional* The options passed to the linear solver factory. By default it is set to None. .. raw:: html
  • **linear_solver_tolerance** : *float, optional* The tolerance of the linear solver in the adjoint equation. By default it is set to 1e-12. .. raw:: html
  • **log_convergence** : *bool, optional* Whether to log the MDA convergence, expressed in terms of normed residuals. By default it is set to False. .. raw:: html
  • **max_mda_iter** : *int, optional* The maximum iterations number for the MDA algorithm. By default it is set to 10. .. raw:: html
  • **name** : *str | None, optional* The name to be given to the MDA. If None, use the name of the class. By default it is set to None. .. raw:: html
  • **relax_factor** : *float, optional* The relaxation factor in the Newton step. By default it is set to 0.99. .. raw:: html
  • **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. .. raw:: html
  • **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. .. raw:: html
  • **warm_start** : *bool, optional* Whether the second iteration and ongoing start from the previous coupling solution. By default it is set to False. .. raw:: html
.. _MDAQuasiNewton_options: MDAQuasiNewton -------------- Module: :class:`gemseo.mda.newton` .. raw:: html
Required parameters
  • **disciplines** : *Sequence[MDODiscipline]* The disciplines from which to compute the MDA. .. raw:: html
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. .. raw:: html
  • **grammar_type** : *str, optional* The type of the input and output grammars, either :attr:`.MDODiscipline.JSON_GRAMMAR_TYPE` or :attr:`.MDODiscipline.SIMPLE_GRAMMAR_TYPE`. By default it is set to JSONGrammar. .. raw:: html
  • **linear_solver** : *str, optional* The name of the linear solver. By default it is set to DEFAULT. .. raw:: html
  • **linear_solver_options** : *Mapping[str, Any], optional* The options passed to the linear solver factory. By default it is set to None. .. raw:: html
  • **linear_solver_tolerance** : *float, optional* The tolerance of the linear solver in the adjoint equation. By default it is set to 1e-12. .. raw:: html
  • **max_mda_iter** : *int, optional* The maximum iterations number for the MDA algorithm. By default it is set to 10. .. raw:: html
  • **method** : *str, optional* The name of the method in scipy root finding, among :attr:`.QUASI_NEWTON_METHODS`. By default it is set to hybr. .. raw:: html
  • **name** : *str | None, optional* The name to be given to the MDA. If None, use the name of the class. By default it is set to None. .. raw:: html
  • **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. .. raw:: html
  • **use_gradient** : *bool, optional* Whether to use the analytic gradient of the discipline. By default it is set to False. .. raw:: html
  • **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. .. raw:: html
  • **warm_start** : *bool, optional* Whether the second iteration and ongoing start from the previous coupling solution. By default it is set to False. .. raw:: html
.. _MDARoot_options: MDARoot ------- Module: :class:`gemseo.mda.newton` .. raw:: html
Required parameters
  • **disciplines** : *Sequence[MDODiscipline]* The disciplines from which to compute the MDA. .. raw:: html
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. .. raw:: html
  • **grammar_type** : *str, optional* The type of the input and output grammars, either :attr:`.MDODiscipline.JSON_GRAMMAR_TYPE` or :attr:`.MDODiscipline.SIMPLE_GRAMMAR_TYPE`. By default it is set to JSONGrammar. .. raw:: html
  • **linear_solver** : *str, optional* The name of the linear solver. By default it is set to DEFAULT. .. raw:: html
  • **linear_solver_options** : *Mapping[str, Any], optional* The options passed to the linear solver factory. By default it is set to None. .. raw:: html
  • **linear_solver_tolerance** : *float, optional* The tolerance of the linear solver in the adjoint equation. By default it is set to 1e-12. .. raw:: html
  • **log_convergence** : *bool, optional* Whether to log the MDA convergence, expressed in terms of normed residuals. By default it is set to False. .. raw:: html
  • **max_mda_iter** : *int, optional* The maximum iterations number for the MDA algorithm. By default it is set to 10. .. raw:: html
  • **name** : *str | None, optional* The name to be given to the MDA. If None, use the name of the class. By default it is set to None. .. raw:: html
  • **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. .. raw:: html
  • **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. .. raw:: html
  • **warm_start** : *bool, optional* Whether the second iteration and ongoing start from the previous coupling solution. By default it is set to False. .. raw:: html
.. _MDASequential_options: MDASequential ------------- Module: :class:`gemseo.mda.sequential_mda` .. raw:: html
Required parameters
  • **disciplines** : *Sequence[MDODiscipline]* The disciplines from which to compute the MDA. .. raw:: html
  • **mda_sequence** : *Sequence[MDA]* The sequence of MDAs. .. raw:: html
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. .. raw:: html
  • **grammar_type** : *str, optional* The type of the input and output grammars, either :attr:`.MDODiscipline.JSON_GRAMMAR_TYPE` or :attr:`.MDODiscipline.SIMPLE_GRAMMAR_TYPE`. By default it is set to JSONGrammar. .. raw:: html
  • **linear_solver** : *str, optional* The name of the linear solver. By default it is set to DEFAULT. .. raw:: html
  • **linear_solver_options** : *Mapping[str, Any], optional* The options passed to the linear solver factory. By default it is set to None. .. raw:: html
  • **linear_solver_tolerance** : *float, optional* The tolerance of the linear solver in the adjoint equation. By default it is set to 1e-12. .. raw:: html
  • **max_mda_iter** : *int, optional* The maximum iterations number for the MDA algorithm. By default it is set to 10. .. raw:: html
  • **name** : *str | None, optional* The name to be given to the MDA. If None, use the name of the class. By default it is set to None. .. raw:: html
  • **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. .. raw:: html
  • **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. .. raw:: html
  • **warm_start** : *bool, optional* Whether the second iteration and ongoing start from the previous coupling solution. By default it is set to False. .. raw:: html