pyoptsparse
pyoptsparse copied to clipboard
`getValues` with `allowSens=True` does not work without specifying `names`.
Description
History.getValues()
does not work when we call it with allowSens=True
and default values for the other inputs.
To make it work, users have to specify appropriate callCounters
and names
.
The docstrings say it is up to the user to ensure that the callCounters specified contain the information requested,
so this behavior is expected, but not very user-friendly.
Steps to reproduce issue
- Run one of the test problems.
- Read the history file and call
hist.getValues(allowSense=True)
.
Current behavior
It tries to parse obj/con/funcs
from the sensitivity evaluation, even though we don't have that info. Then it fails with KeyError.
Expected behavior
It should raise a pyOptSparse Warning or Error when allowSens=True
and the (default or user-specified) callCounters
and names
are not valid.
It'd be better if we can overwrite callCounters
and names
internally.
Related to #250.