-
Notifications
You must be signed in to change notification settings - Fork 17
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
Refactor AnyFFT #1099
Refactor AnyFFT #1099
Conversation
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.
Looks great, thanks for this PR! This can be merged once the comments below are addressed.
* ``FFTDirichletDirect`` Use the discrete sine transformation that is directly implemented | ||
by FFTW to solve the Poisson equation with Dirichlet boundary conditions. | ||
This option is only available when compiling for CPUs with FFTW. | ||
Preferred resolution: :math:`2^N-1`. | ||
|
||
* ``FFTDirichletExpanded`` Perform the discrete sine transformation by symmetrically | ||
expanding the field to twice its size. | ||
Preferred resolution: :math:`2^N-1`. | ||
|
||
* ``FFTDirichletFast`` Perform the discrete sine transformation using a fast sine transform | ||
algorithm that uses FFTs of the same size as the fields. | ||
Preferred resolution: :math:`2^N-1`. | ||
|
||
* ``MGDirichlet`` Use the HiPACE++ multigrid solver to solve the Poisson equation with | ||
Dirichlet boundary conditions. | ||
Preferred resolution: :math:`2^N` and :math:`2^N-1`. | ||
|
||
* ``FFTPeriodic`` Use FFTs to solve the Poisson equation with Periodic boundary conditions. | ||
Note that this does not work with features that change the boundary values, | ||
like mesh refinement or open boundaries. | ||
Preferred resolution: :math:`2^N`. |
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.
Nice doc!
src/laser/MultiLaser.cpp
Outdated
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.
Really nice improvement here too!
In this PR, the functions that calculate a discrete sine transformation using an FFT are moved from AnyDST to the Poisson solvers.
This PR also fixes FFTDirichletExpanded for rocfft by setting the expanded position array (the FFT input) to zero after every FFT. Presumably, rocfft is using the array as work area.
New AnyFFT interface:
Testing: