hydesign.openmdao_wrapper
Classes
Class to inherit from when all output variables are explicit. |
Module Contents
- class hydesign.openmdao_wrapper.ComponentWrapper(inputs, outputs, function, gradient_function=None, additional_inputs=None, additional_outputs=None, partial_options=None, **kwargs)[source]
Bases:
openmdao.core.explicitcomponent.ExplicitComponent
Class to inherit from when all output variables are explicit.
- Parameters:
**kwargs (dict of keyword arguments) – Keyword arguments that will be mapped into the Component options.
- _vjp_hash[source]
Hash value for the last set of inputs to the compute_primal function.
- Type:
int or None
- compute(inputs, outputs)[source]
Execute the wrapped function and write its results to
outputs
.- Parameters:
inputs (openmdao.api.Vector) – Input values provided by OpenMDAO.
outputs (openmdao.api.Vector) – Vector to populate with the function results.
- compute_partials(inputs, J)[source]
Compute sub-jacobian parts. The model is assumed to be in an unscaled state.
- Parameters:
inputs (Vector) – Unscaled, dimensional input variables read via inputs[key].
partials (Jacobian) – Sub-jac components written to partials[output_name, input_name]..
discrete_inputs (dict or None) – If not None, dict containing discrete input values.