-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added interpolation of results to arbitrary nodes, removed use of scipy.interpolate.interp1d
from phase.interp
.
#1129
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
…ues in interpolation.
…d interpolate function from phase.
…ion instead of gl
# self.rho_interp = InterpND(points=np.array(alt_data), | ||
# values=np.array(rho_data), | ||
# method='slinear', extrapolate=True) | ||
self.rho_interp = make_interp_spline(alt_data, rho_data, k=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleanup
p.driver = om.pyOptSparseDriver() | ||
p.driver.options['optimizer'] = 'IPOPT' | ||
p.driver = om.ScipyOptimizeDriver() | ||
# p.driver.options['optimizer'] = 'SLSQP' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleanup
res = np.atleast_2d(interpfunc(node_locations)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If reversed_xs
, do you need to flip the indices on res
before returning it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I don't think so. By flipping the results returned by unique, which are always sorted, we recover the requested ordering.
Summary
phase.interp
to obtain outputs on any set of points in phase tau space [-1, 1].phase.interp
to usescipy.interpolate.make_interp_spline
. Spline types that are no longer supported will now result in linear interpolation.Phase.interpolate
method. users should usePhase.interp
.ScipyOptimizeDriver
.In general IPOPT on the latest workflow seems to be having issues with converging some of the problems, but it's not obvious yet as to why. Need to keep an eye on it.
Related Issues
Backwards incompatibilities
-
Phase.interpolate
is removed in favor ofPhase.interp
.New Dependencies
None