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

Fix inverse_phat_square #138

Merged
merged 2 commits into from
Dec 11, 2023
Merged

Fix inverse_phat_square #138

merged 2 commits into from
Dec 11, 2023

Conversation

gnrraphi
Copy link
Contributor

In line

dimensions = list(range(grid.nd))

dimensions can be arbitrary, but line
self.weight[0, 0, 0, 0] = (2.0 * np.pi) ** 2.0 / np.prod(

only works for dimensions equals 4.
This can be fixed by changing self.weight[0, 0, 0, 0] to self.weight[coor[0:1]].

@lehner
Copy link
Owner

lehner commented Dec 11, 2023

This is no longer correct for multi-rank jobs. g.coordinates returns the global coordinates corresponding to the local view. So it will only on rank 0 do the correct thing. You can instead try "tuple([0]*grid.nd)" as argument?

@lehner lehner merged commit f290517 into lehner:master Dec 11, 2023
47 checks passed
@gnrraphi gnrraphi deleted the fourier_accelerate branch December 11, 2023 09:18
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