func_operations module¶
The functional operations.
- class gemseo.core.mdofunctions.func_operations.LinearComposition(orig_function, interp_operator)[source]
Bases:
MDOFunction
Linear composite function.
Given a matrix \(A\), a function \(f\) and an input vector \(x\), the linear composite function outputs \(f(Ax)\).
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
orig_function (MDOFunction) – The function \(f\).
interp_operator (RealArray) – The matrix \(A\).
- 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.
- last_eval: OutputType | None
The value of the function output at the last evaluation.
None
if it has not yet been evaluated.
- special_repr: str
The string representation of the function overloading its default string ones.
- class gemseo.core.mdofunctions.func_operations.RestrictedFunction(orig_function, restriction_indices, restriction_values)[source]
Bases:
MDOFunction
Restrict an MDOFunction to a subset of its input vector.
Fixes the rest of the indices.
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
orig_function (MDOFunction) – The original function to restrict.
restriction_indices (Sequence[int]) – The indices array of the input vector to fix.
restriction_values (RealArray) – The values of the input vector at the indices, ‘restriction_indices’ are set to ‘restriction_values’.
- Raises:
ValueError – If the shape of the restriction values is not consistent with the shape of the restriction indices.
- 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.
- last_eval: OutputType | None
The value of the function output at the last evaluation.
None
if it has not yet been evaluated.
- special_repr: str
The string representation of the function overloading its default string ones.