Skip to content
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

Additional speed improvements for interpolation. #2325

Merged
merged 4 commits into from
Nov 2, 2021

Conversation

Kenneth-T-Moore
Copy link
Member

Summary

  1. Implemented a much faster way to compute the partials in the new 3d lagrange3 interpolation method.
  2. Other speedups are minor, but they include removing an "in" check before computing np.where, because that check was actually slower than np.where.

Related Issues

  • Resolves #

Backwards incompatibilities

None

New Dependencies

None

i_x, i_y, i_z = idx

# extrapolate low
extrap_idx = np.where(i_x < 1)[0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious how these three lines compare speed wise to i_x[i_x < 1] = 1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that seems to be quite a bit faster in isolated testing. Let me try some more benching, then i'll make the changes.

@coveralls
Copy link

coveralls commented Oct 29, 2021

Coverage Status

Coverage decreased (-0.4%) to 88.898% when pulling f42508b on Kenneth-T-Moore:interp_speed2 into f83be39 on OpenMDAO:master.

@swryan swryan merged commit f42508b into OpenMDAO:master Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants