fluidfft.fft2d.operators
Operators 2d (fluidfft.fft2d.operators
)
- class fluidfft.fft2d.operators.OperatorsPseudoSpectral2D(nx, ny, lx, ly, fft=None, coef_dealiasing=1.0)[source]
Bases:
OperatorsBase
Perform 2D FFT and operations on data.
- Parameters:
- nxint
Global dimension over the x-axis (second dimension for the real arrays).
- nyint
Global dimension over the y-axis (first dimension for the real arrays).
- lxfloat
Length of the domain along the x-axis.
- lyfloat
Length of the domain along the y-axis.
- fftstr or FFT classes
Name of module or string characterizing a method. It has to correspond to a module of fluidfft. The first part “fluidfft.” of the module “path” can be omitted.
- coef_dealiasingfloat
- nK0_loc: int
- nK1_loc: int
- KY: float64[:,:]
- KX: float64[:,:]
- where_dealiased: uint8[][]
- property K_not0
- property K2_not0
- property K4_not0
- property KX_over_K2
- property KY_over_K2
- sum_wavenumbers_versatile(field_fft)[source]
Compute the sum over all wavenumbers (versatile version).
This function should return the same result than
sum_wavenumbers()
.It is here mainly to check that the classes are well implemented.
- compute_spectrum_kykx(energy_fft, folded=True)[source]
Compute a spectrum vs ky, kx. Return a dictionary.
- Parameters:
- energy_fftndarray[float]
A real valued 2D array representing the energy content in each wavenumber.
- foldedbool
Computes a spectra with the (+ky, +kx) and (-ky, +kx) quadrants folded, when
True
.
- projection_perp(fx_fft, fy_fft)[source]
Project (inplace) a vector perpendicular to the wavevector.
The resulting vector is divergence-free.
- rotfft_from_vecfft(vecx_fft: complex128[:, :], vecy_fft: complex128[:, :])[source]
Return the rotational of a vector in spectral space.
- divfft_from_vecfft(vecx_fft: complex128[:, :], vecy_fft: complex128[:, :])[source]
Return the divergence of a vector in spectral space.
- vecfft_from_rotfft(rot_fft: complex128[:, :])[source]
Return the velocity in spectral space computed from the rotational.
- vecfft_from_divfft(div_fft: complex128[:, :])[source]
Return the velocity in spectral space computed from the divergence.
Functions
|
Get a simple 2d parallel method |
|
Get a simple 2d sequential method |
Classes
|
Perform 2D FFT and operations on data. |