You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current SWFFT implementation of the structure factor is a bit brittle in parallel (only works for sure if the # of processors = the # of grids; the actual requirement may be slightly looser but this may not be coded up correctly on our end)
We may want to consider what WarpX does using standard FFTW libraries.
Also, the shifting algorithm (to put k=0 in the center) is performed on one grid and eventually may not fit in memory for large problems.
The text was updated successfully, but these errors were encountered:
In https://github.com/ajnonaka/fft-test.git directory fft-test/local I have a serial implementation of fftw given input multifab data. I figured out the complex conjugate reflecting to make it match SWFFT (which needs to be shifted again to put k=0 at the center)
For domains from (0,0,0) to (Nx-1,Ny-1,Nz-1)
For any cells with i index >= Nx/2, these values are complex conjugates of the corresponding entry where (Nx-i,Ny-j,Nz-k) UNLESS that index is zero, in which case you use 0.
e.g. for an 8^3 domain, any cell with i index
Cell (6,2,3) is complex conjugate of (2,6,5)
Cell (4,1,0) is complex conjugate of (4,7,0) (note that the FFT is computed for 0 <= i <= Nx/2)
I believe for all the structure factor FFTs (including flattened multifabs 3D->2D and 2D->1D) that serial FFTW has now been implemented. I have tested this for both dimensionalities, full and flattened multifabs, parallel runs with multiple grids on the regular domain, and non-cubic domains. Leaving this issue open until a few more tests have been run.
The current SWFFT implementation of the structure factor is a bit brittle in parallel (only works for sure if the # of processors = the # of grids; the actual requirement may be slightly looser but this may not be coded up correctly on our end)
We may want to consider what WarpX does using standard FFTW libraries.
Also, the shifting algorithm (to put k=0 in the center) is performed on one grid and eventually may not fit in memory for large problems.
The text was updated successfully, but these errors were encountered: