gemseo.core.mdo_functions.function_from_discipline module#

The MDOFunction subclass to create a function from a Discipline.

class FunctionFromDiscipline(output_names, formulation, discipline=None, top_level_disc=True, input_names=(), all_input_names=(), is_differentiable=True)[source]#

Bases: MDOFunction

A function computing some outputs of a discipline for some of its inputs.

This function is called from an input vector defined from a larger number of input variables.

Parameters:
  • output_names (Iterable[str]) -- The discipline output names defining the function output vector.

  • formulation (BaseFormulation) -- The MDO formulation to which the function will be attached.

  • discipline (Discipline | None) -- The discipline computing these outputs. If None, the discipline is detected from the inner disciplines.

  • top_level_disc (bool) --

    Whether the inner disciplines are the top level disciplines of the formulation; otherwise, the disciplines used to instantiate the formulation are considered.

    By default it is set to True.

  • input_names (Sequence[str]) --

    The discipline input names defining the input vector of the discipline adapter. If empty, use the names of the discipline inputs that are also design variables.

    By default it is set to ().

  • all_input_names (Iterable[str]) --

    The discipline input names defining the function input vector. If empty, use all the design variables.

    By default it is set to ().

  • is_differentiable (bool) --

    Whether the function is differentiable.

    By default it is set to True.

generator_class#

The class used to generator the DisciplineAdapter.

alias of DisciplineAdapterGenerator

property discipline_adapter: DisciplineAdapter#

The discipline adapter.