gemseo.disciplines.analytic module#

A discipline based on analytic expressions.

class AnalyticDiscipline(expressions, name='')[source]#

Bases: Discipline

A discipline based on analytic expressions.

Use SymPy, a symbolic calculation engine.

Compute the Jacobian matrices by automatically differentiating the expressions.

Examples

>>> from gemseo.disciplines.analytic import AnalyticDiscipline
>>> discipline = AnalyticDiscipline({"y_1": "2*x**2", "y_2": "4*x**2+5+z**3"})

Initialize self. See help(type(self)) for accurate signature.

Parameters:
  • expressions (Mapping[str, str | Expr]) -- The outputs expressed as functions of the inputs.

  • name (str) --

    The name of the discipline. If empty, use the name of the class.

    By default it is set to "".

expressions: Mapping[str, str | Expr]#

The outputs expressed as functions of the inputs.

input_names: list[str]#

The names of the inputs.

output_names_to_symbols: dict[str, list[str]]#

The names of the inputs associated to the outputs.

E.g. {"out": ["in_1", "in_2"]}.