func_operations module¶
The functional operations.
- class gemseo.core.mdofunctions.func_operations.LinearComposition(orig_function, interp_operator)[source]
Bases:
MDOFunction
Compose a function with a linear operator defined by a matrix.
Compute orig_f(Mat.dot(x)).
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
orig_function (MDOFunction) – The original function to be restricted.
interp_operator (ndarray) – The operator matrix, the output of the function will be f(interp_operator.dot(x)).
- 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 (ndarray) – The indices array of the input vector to fix.
restriction_values (ndarray) – 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.