#include "plumbing/defs.h"
#include "datatypes/cmplx.h"
#include "plumbing/coordinates.h"
#include "plumbing/field.h"
#include "plumbing/timing.h"
#include <fftw3.h>
#include "plumbing/fft_fftw_transform.h"
Go to the source code of this file.
◆ FFT_complex_to_real_loc()
FFT_complex_to_real; Field must be a complex-valued field, result is a real field of the same number type Not optimized, should not be used on a hot path
Because the complex field must have the property f(-x) = f(L-x) = f(x)^*, only half of the values in input field are significant, the routine does the appropriate symmetrization.
Routine FFT_complex_to_real_loc(CoordinateVector cv) gives the significant values at location cv: = +1 significant complex value, = 0 significant real part, imag ignored = -1 value ignored here Example: in 2d 8x8 lattice the sites are: (* = (0,0), value 0)
- + + + - - - - - - - 0 + + + 0
- + + + - - - - - - - + + + + +
- + + + - - - - after centering - - - + + + + + 0 + + + 0 - - - (0,0) to center - - - + + + + +
- + + + + - - - --------------—> - - - * + + + 0
- + + + + - - - - - - - + + + -
- + + + + - - - - - - - + + + -
- + + + 0 - - - - - - - + + + -
Definition at line 504 of file fft.h.
◆ FFT_field() [1/2]
Complex-to-complex FFT transform of a field input, result in result. input and result can be same, "in-place". Both input and output are of type Field<T>, where T must contain complex type, Complex<float> or Complex<double>. directions: if directions[dir] == false (or 0), transform is not done to direction dir. fftdir: direction of the transform itself: fft_direction::forward (default) x -> k fft_direction::inverse k-> x FFT is unnormalized: transform + inverse transform yields source multiplied by the product of the size of the lattice to active directions If all directions are active, result = source * lattice.volume():
Definition at line 376 of file fft.h.
◆ FFT_field() [2/2]
Complex-to-complex FFT transform of a field input, result in result. Same as FFT_field(input,result,directions,fftdir) with all directions active.
Definition at line 405 of file fft.h.
◆ init_pencil_direction()
Initialize fft direction - defined in fft.cpp.
Initialize fft direction - defined in fft.cpp.
Definition at line 61 of file fft.cpp.
◆ pencil_get_buffer_offsets()
Build offsets to buffer arrays: Fastest Direction = dir, offset 1 next fastest index of complex_t elements in T, offset elem_offset and then other directions, in order Returns element_offset and sets offset and nmin vectors
Definition at line 39 of file fft.cpp.