.. 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-49 .. code-block:: default from __future__ import absolute_import, division, print_function, unicode_literals from future import standard_library from gemseo.api import ( configure_logger, create_discipline, create_mda, get_available_mdas, get_mda_options_schema, ) configure_logger() standard_library.install_aliases() .. GENERATED FROM PYTHON SOURCE LINES 50-55 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 55-57 .. 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', 'SobieskiMDAGaussSeidel', 'SobieskiMDAJacobi'] .. GENERATED FROM PYTHON SOURCE LINES 58-62 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 62-64 .. code-block:: default print(get_mda_options_schema("MDAGaussSeidel")) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none {'type': 'object', 'properties': {'name': {'description': 'the name of the chain\n:type name: str\n'}, 'max_mda_iter': {'type': 'integer', 'description': 'maximum number of iterations\n:type max_mda_iter: int\n'}, 'grammar_type': {'type': 'string', 'description': 'the type of grammar to use for IO declaration\neither JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE\n:type grammar_type: str\n'}, 'tolerance': {'type': 'number', 'description': 'tolerance of the iterative direct coupling solver,\nnorm of the current residuals divided by initial residuals norm\nshall be lower than the tolerance to stop iterating\n:type tolerance: float\n'}, 'linear_solver_tolerance': {'type': 'number', 'description': 'Tolerance of the linear solver\nin the adjoint equation\n:type linear_solver_tolerance: float\n'}, 'warm_start': {'type': 'boolean', 'description': 'if True, the second iteration and ongoing\nstart from the previous coupling solution\n:type warm_start: bool\n'}, 'use_lu_fact': {'type': 'boolean', 'description': 'if True, when using adjoint/forward\ndifferenciation, store a LU factorization of the matrix\nto solve faster multiple RHS problem\n:type use_lu_fact: bool\n'}, 'norm0': {'description': 'reference value of the norm of the residual to compute\nthe decrease stop criteria.\nIterations stops when norm(residual)/norm0` .. 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 `_