Search code examples
gradientopenmdao

OpenMDAOv1+: Is there a way to finite difference over a single variable in a component?


I'm pretty sure I already know the answer to this, but is there a way to finite difference over a single variable in a component that already provides the derivatives of all its other variables? The only way I can come up with is to hard code my own finite differenced gradient for the single variable within the component in question so that openmdao sees the result as a provided gradient.


Solution

  • You are right, that is the only way to do it right now. We have talked about adding an option to automatically fill in the missing derivatives with finite difference ones, but I think it will be a while before that is implemented.