fluidfft.fft2d
2d Fast Fourier Transform classes (fluidfft.fft2d
)
This package contains extension modules containing classes for performing Fast Fourier Transform with different methods and libraries. The number of classes depend on how fluidfft has been compiled. The 2d classes currently implemented are:
fluidfft.fft2d.with_fftw1d.FFT2DWithFFTW1D
fluidfft.fft2d.with_fftw2d.FFT2DWithFFTW2D
fluidfft.fft2d.with_cufft.FFT2DWithCUFFT
fluidfft.fft2d.mpi_with_fftwmpi2d.FFT2DMPIWithFFTW1D
fluidfft.fft2d.mpi_with_fftwmpi2d.FFT2DMPIWithFFTWMPI2D
To use the FFT classes in real codes, it is simpler and recommended to use the
class fluidfft.fft2d.operators.OperatorsPseudoSpectral2D
defined in
the package
Operators 2d ( |
All FFT classes are very similar and provide the same public functions. Since these classes are defined in Cython extensions that can not easily be compiled on the readthedocs server, the API of the 2d classes is presented in this fake FFT class:
- class fluidfft.fft2d.FFT2dFakeForDoc(n0=2, n1=2)[source]
Bases:
object
Perform Fast Fourier Transform in 2d.
- Parameters:
- n0int
Global size over the first dimension in spatial space. This corresponds to the y direction.
- n1int
Global size over the second dimension in spatial space. This corresponds to the x direction.
- get_shapeK_seq()[source]
Get the shape of the complex array as it would be with nb_proc = 1
Warning: if get_is_transposed(), the complex array would also be transposed, so in this case, one should write:
nKy = self.get_shapeK_seq[1]
- get_k_adim_loc()[source]
Get the non-dimensional wavenumbers stored locally.
- Returns:
- k0_adim_locnp.ndarray
- k1_adim_locnp.ndarray
- The indices correspond to the index of the dimension in spectral space.
Functions
|
Return all parallel 2d classes. |
|
Return all sequential 2d classes. |