mdo_discipline_adapter module¶
A function computing some outputs of a discipline from some of its inputs.
- class gemseo.core.mdofunctions.mdo_discipline_adapter.MDODisciplineAdapter(input_names, output_names, default_inputs, discipline, names_to_sizes=None, linear_candidate=False)[source]
Bases:
LinearCandidateFunction
An
MDOFunction
executing a discipline for some inputs and outputs.Initialize self. See help(type(self)) for accurate signature.
- Parameters:
input_names (Sequence[str]) – The names of the inputs.
output_names (Sequence[str]) – The names of the outputs.
default_inputs (Mapping[str, ndarray] | None) – The default input values to overload the ones of the discipline at each evaluation of the outputs with
_fun()
or their derivatives with_jac()
. IfNone
, do not overload them.discipline (MDODiscipline) – The discipline to be adapted.
names_to_sizes (MutableMapping[str, int] | None) – The sizes of the input variables. If
None
, determine them from the default inputs and local data of the disciplineMDODiscipline
.linear_candidate (bool) –
Whether the final MDOFunction could be linear.
By default it is set to False.
- force_real: bool
Whether to cast the results to real value.
- has_default_name: bool
Whether the name has been set with a default value.
- property input_dimension: int | None
The input variable dimension, needed for linear candidates.
If
None
this cannot be determined nor byMDODiscipline
default inputs nor byMDODisciplineAdapter.__input_names_to_sizes
.
- last_eval: OutputType | None
The value of the function output at the last evaluation.
None
if it has not yet been evaluated.
- property linear_candidate: bool
Whether the final MDOFunction could be linear.
- special_repr: str
The string representation of the function overloading its default string ones.