gemseo.disciplines.remapping module#

A discipline whose inputs and outputs map to those of another.

class RemappingDiscipline(discipline, input_mapping=mappingproxy({}), output_mapping=mappingproxy({}))[source]#

Bases: Discipline

A discipline whose inputs and outputs map to those of another.

An input or output name mapping looks like {"new_x": "x", "new_y": ("y", components)} where the variable "new_x" corresponds to the original variable "x" and the variable "new_y" corresponds to some components of the original variable "y". components can be an integer i (the i-th component of y), a sequence of integers [i, j, k] (the i-th, j-th and k-th components of y) or an iterable of integers range(i, j+1) (from the i-th to the j-th components of y).

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

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

  • input_mapping (NameMapping) --

    The input names to the original input names.

    By default it is set to {}.

  • output_mapping (NameMapping) --

    The output names to the original output names.

    By default it is set to {}.

Raises:

ValueError -- When the original discipline has no default input values.

cache: BaseCache | None#

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

default_grammar_type: ClassVar[_GrammarType] = 'SimplerGrammar'#

The default type of grammar.

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.

property original_discipline: Discipline#

The original discipline.