gemseo / wrappers

Show inherited members

filtering_discipline module

Filtering wrapper.

class gemseo.wrappers.filtering_discipline.FilteringDiscipline(discipline, input_names=None, output_names=None, keep_in=True, keep_out=True)[source]

Bases: MDODiscipline

A class to wrap another MDODiscipline for a subset of inputs and outputs.

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

  • discipline (MDODiscipline) – The original discipline.

  • input_names (Iterable[str] | None) – The names of the inputs of interest. If None, use all the inputs.

  • output_names (Iterable[str] | None) – The names of the outputs of interest. If None, use all the outputs.

  • keep_in (bool) –

    Whether to the inputs of interest. Otherwise, remove them.

    By default it is set to True.

  • keep_out (bool) –

    Whether to the outputs of interest. Otherwise, remove them.

    By default it is set to True.

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: dict[str, dict[str, ndarray]]

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: Mapping[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.