gemseo / disciplines

Show inherited members

concatenater module

The concatenation of several input variables into a single one.

class gemseo.disciplines.concatenater.Concatenater(input_variables, output_variable, input_coefficients=None)[source]

Bases: MDODiscipline

Concatenate input variables into a single output variable.

These input variables can be scaled before concatenation.

Examples

>>> from gemseo import create_discipline
>>> sellar_system_disc = create_discipline("SellarSystem")
>>> constraint_names = ["c1", "c2"]
>>> output_name = ["c"]
>>> concatenation_disc = create_discipline(
...     "Concatenater", constraint_names, output_name
... )
>>> disciplines = [sellar_system_disc, concatenation_disc]
>>> chain = create_discipline("MDOChain", disciplines=disciplines)
>>> print(chain.execute())
>>> print(chain.linearize(compute_all_jacobians=True))

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

Parameters:
  • input_variables (Sequence[str]) – The input variables to concatenate.

  • output_variable (str) – The output variable name.

  • input_coefficients (dict[str, float] | None) – The coefficients related to the different input variables.

cache: AbstractCache | None

The cache containing one or several executions of the discipline according to the cache policy.

data_processor: DataProcessor

A tool to pre- and post-process discipline data.

exec_for_lin: bool

Whether the last execution was due to a linearization.

input_grammar: BaseGrammar

The input grammar.

jac: MutableMapping[str, MutableMapping[str, ndarray | csr_array | JacobianOperator]]

The Jacobians of the outputs wrt inputs.

The structure is {output: {input: matrix}}.

name: str

The name of the discipline.

output_grammar: BaseGrammar

The output grammar.

re_exec_policy: ReExecutionPolicy

The policy to re-execute the same discipline.

residual_variables: dict[str, str]

The output variables mapping to their inputs, to be considered as residuals; they shall be equal to zero.

run_solves_residuals: bool

Whether the run method shall solve the residuals.

Examples using Concatenater

Examples for constraint aggregation

Examples for constraint aggregation