gemseo.disciplines.ode.ode_function module#

ODE Function.

class ODEFunction(discipline, time_name, state_names, output_names=(), terminal=False)[source]#

Bases: object

A function wrapping a discipline for ODEs.

This function has time and state as arguments, and an attribute 'terminal'.

Parameters:
  • discipline (Discipline) -- The wrapped discipline.

  • time_name (str) -- The name of the time variable.

  • state_names (Iterable[str] | Mapping[str, str]) -- The names of the state variables.

  • output_names (Iterable[str]) --

    The names of the output variables. If empty, use all discipline's output variables.

    By default it is set to ().

  • terminal (bool) --

    Whether this is a termination function.

    By default it is set to False.

evaluate_jacobian(time, state)[source]#
Parameters:
  • time (RealArray) -- The time at the evaluation of the function.

  • state (RealArray) -- The state of the ODE at the evaluation of the function.

Returns:

The Jacobian wrt state of the function at the given time and state.

Return type:

RealArray

terminal: bool#

An attribute used by ODE libraries.