.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/api/plot_mda.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_api_plot_mda.py: MDA === In this example, we will discover the different functions of the API related to MDAs, which are the |g|' objects dedicated to the feasibility of the multidisciplinary coupling. All classes implementing MDAs inherit from :class:`.MDA` which is an abstract class. .. GENERATED FROM PYTHON SOURCE LINES 32-46 .. code-block:: default from __future__ import division, unicode_literals from gemseo.api import ( configure_logger, create_discipline, create_mda, get_available_mdas, get_mda_options_schema, ) configure_logger() .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 47-52 Get available MDA ----------------- The :meth:`~gemseo.api.get_available_mdas` function returns the list of MDAs available in |g| or in external modules .. GENERATED FROM PYTHON SOURCE LINES 52-54 .. code-block:: default print(get_available_mdas()) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none ['GSNewtonMDA', 'MDAChain', 'MDAGaussSeidel', 'MDAJacobi', 'MDANewtonRaphson', 'MDAQuasiNewton', 'MDARoot', 'MDASequential'] .. GENERATED FROM PYTHON SOURCE LINES 55-59 Get MDA options schema ---------------------- For a given MDA algorithm, e.g. :code:`"MDAGaussSeidel"`, we can get the options; e.g. .. GENERATED FROM PYTHON SOURCE LINES 59-61 .. code-block:: default print(get_mda_options_schema("MDAGaussSeidel")) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none {'$schema': 'http://json-schema.org/schema#', 'type': 'object', 'properties': {'name': {'description': 'The name to be given to the MDA. If None, use the name of the class.', 'type': 'null'}, 'max_mda_iter': {'description': 'The maximum iterations number for the MDA algorithm.', 'type': 'integer'}, 'grammar_type': {'description': 'The type of the input and output grammars, either :attr:`JSON_GRAMMAR_TYPE` or :attr:`SIMPLE_GRAMMAR_TYPE`.', 'type': 'string'}, 'tolerance': {'description': '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.', 'type': 'number'}, 'linear_solver_tolerance': {'description': 'The tolerance of the linear solver in the adjoint equation.', 'type': 'number'}, 'warm_start': {'description': 'Whether the second iteration and ongoing start from the previous coupling solution.', 'type': 'boolean'}, 'use_lu_fact': {'description': 'Whether to store a LU factorization of the matrix when using adjoint/forward differentiation. to solve faster multiple RHS problem.', 'type': 'boolean'}, 'over_relax_factor': {'description': 'The relaxation coefficient, used to make the method more robust, if ``0` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_mda.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_