gemseo.disciplines.splitter module#

A discipline splitting an input variable.

class Splitter(input_name, output_names_to_input_indices)[source]#

Bases: Discipline

A discipline splitting an input variable.

Several output variables containing slice of the input variable are extracted.

Examples

>>> discipline = Splitter("alpha", {"beta": [0, 1], "delta": [2, 3],
"gamma": 4})
>>> discipline.execute({"alpha": array([1.0, 2.0, 3.0, 4.0, 5.0])})
>>> delta = discipline.io.data["delta"]  # delta = array([3.0, 4.0])

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

Parameters:
  • input_name (str) -- The name of the input to split.

  • output_names_to_input_indices (dict[str, Iterable[int] | int]) -- The input indices associated with the output names.

cache: BaseCache | None#

The execution and linearization data saved according to the cache type.

execution_statistics: ExecutionStatistics#

The execution statistics of the process.

execution_status: ExecutionStatus#

The execution status of the process.

jac: JacobianData#

The Jacobian matrices of the outputs.

The structure is {output_name: {input_name: jacobian_matrix}}.

name: str#

The name of the process.