fluidfft.fft3d
3d Fast Fourier Transform classes (fluidfft.fft3d
)
This package contains extension modules containing classes for performing Fast Fourier Transform with different methods and libraries.
To use the FFT classes in real codes, it is simpler and recommended to use the
class fluidfft.fft3d.operators.OperatorsPseudoSpectral3D
defined in
the package
Operators 3d (fluidfft.fft3d.operators) 
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 3d classes is presented in this fake FFT class:
 class fluidfft.fft3d.FFT3dFakeForDoc(n0=2, n1=2, n2=4)[source]
Bases:
object
Perform Fast Fourier Transform in 3D.
 Parameters:
 n0int
Global size over the first dimension in spatial space. This corresponds to the z direction.
 n1int
Global size over the second dimension in spatial space. This corresponds to the y direction.
 n2int
Global size over the second dimension in spatial space. This corresponds to the x direction.
 get_dim_first_fft()[source]
The dimension (real space) over which the first fft is taken.
It is usually 2 but it seems to be 0 for p3dfft (written in Fortran!).
 ifft_as_arg(fieldK, fieldX)[source]
Perform iFFT and put result in second argument.
Note
The values in the input array would be retained by making a copy to an intermediate input array. This can have a performance impact.
 ifft_as_arg_destroy(fieldK, fieldX)[source]
Perform iFFT and put result in second argument.
Note
The values in the input array would be destroyed for the better performance.
 get_seq_indices_first_K()[source]
Get the “sequential” indices of the first number in Fourier space.
 get_k_adim_loc()[source]
Get the nondimensional wavenumbers stored locally.
 Returns:
 k0_adim_locnp.ndarray
 k1_adim_locnp.ndarray
 k2_adim_locnp.ndarray
 The indices correspond to the index of the dimension in spectral space.
 build_invariant_arrayX_from_2d_indices12X(o2d, arr2d)[source]
Build an array in real space invariant in the third dim.
Functions

Return all parallel 3d classes. 

Return all sequential 3d classes. 