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 somecomponents
of the original variable"y"
.components
can be an integeri
(thei
-th component ofy
), a sequence of integers[i, j, k]
(thei
-th,j
-th andk
-th components ofy
) or an iterable of integersrange(i, j+1)
(from thei
-th to thej
-th components ofy
).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.
- default_grammar_type: ClassVar[_GrammarType] = 'SimplerGrammar'#
The default type of grammar.
- property original_discipline: Discipline#
The original discipline.