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

Try to make splines more periodic #34

Merged
merged 5 commits into from
Dec 9, 2024
Merged

Try to make splines more periodic #34

merged 5 commits into from
Dec 9, 2024

Conversation

dschwoerer
Copy link
Collaborator

The RectBivariateSpline does not support periodic data, but by including copies on the left and on the right, the spline will be closer to periodic.

The RectBivariateSpline does not support periodic data, but by including
copies on the left and on the right, the spline will be closer to periodic.
Only difference between the two codepaths is that one contains 1/By and the
other Rmaj / By. setting Rmaj to one unifies them.
In some cases it is easier to calculate all components at once
Adding a new function can be far more efficient for these
cases.
# Repeat the final point in y since periodic in y
R_ext = np.concatenate((R, np.reshape(R[:, 0], (nx, 1))), axis=1)
Z_ext = np.concatenate((Z, np.reshape(Z[:, 0], (nx, 1))), axis=1)
R_ext = np.concatenate((R, R, R), axis=1)
Copy link
Member

Choose a reason for hiding this comment

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

Comment above probably wants changing!

@dschwoerer dschwoerer merged commit 7aa4e78 into master Dec 9, 2024
10 checks passed
@dschwoerer dschwoerer deleted the more-6 branch December 9, 2024 09:50
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.

2 participants