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

Use FFTs in poloidal direction where possible #641

Open
f0uriest opened this issue Aug 29, 2023 · 2 comments
Open

Use FFTs in poloidal direction where possible #641

f0uriest opened this issue Aug 29, 2023 · 2 comments
Labels
enhancement General label for enhancement. Please also tag with "Speed", "Interface", "Functionality", etc good first issue Good for newcomers hackathon Stuff to work on during hackathon P1 Lowest Priority, will get to eventually performance New feature or request to make the code faster

Comments

@f0uriest
Copy link
Member

Several objectives now use QuadratureGrid or LinearGrid for their default (to get accurate volume or surface averages), and because they are uniform in the poloidal direction we could possibly use FFTs to do that part of the transform. This would like see a decent speed bump and memory savings, similar to using FFTs for the poloidal direction. This would be added as another option to the Transform class.

@f0uriest f0uriest added performance New feature or request to make the code faster good first issue Good for newcomers low priority Nice to have, but not needed right away enhancement General label for enhancement. Please also tag with "Speed", "Interface", "Functionality", etc labels Aug 29, 2023
@f0uriest f0uriest self-assigned this Feb 18, 2024
@f0uriest f0uriest added the hackathon Stuff to work on during hackathon label Mar 7, 2024
@rahulgaur104
Copy link
Collaborator

rahulgaur104 commented Mar 7, 2024

I am interested in this one. So, it would be like poloidal * Grid where poloidal is a FourierRZToroidalSurface object. I am assume the poloidal dependence is separable from the non-poloidal dependence.

@f0uriest
Copy link
Member Author

f0uriest commented Mar 7, 2024

yeah you can take a look at desc.transform.Transform to see how we do it for toroidal stuff. I think you'd first do a regular matmul for the radial part, which goes from the fourier-zernike basis to a double fourier series on each surface, then do an fft in both poloidal and toroidal directions (possibly simultaneously with fft2?). The main annoyance is that our fourier series are in the double angle form so you need to reshape and re-arange and pad stuff to be able to use a regular fft. See how we do it for the toroidal part, its probably similar though might also get complicated if the grid is symmetric (since that means poloidal nodes are ommitted).

@dpanici dpanici added P1 Lowest Priority, will get to eventually and removed low priority Nice to have, but not needed right away labels Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General label for enhancement. Please also tag with "Speed", "Interface", "Functionality", etc good first issue Good for newcomers hackathon Stuff to work on during hackathon P1 Lowest Priority, will get to eventually performance New feature or request to make the code faster
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants