# fluidsim.operators.operators2d

## Operators 2d (fluidsim.operators.operators2d)

Provides

class fluidsim.operators.operators2d.OperatorsPseudoSpectral2D(params)[source]

Bases: OperatorsPseudoSpectral2D, OperatorBase

static _complete_params_with_default(params)[source]

This static method is used to complete the params container.

dealiasing_setofvar(sov: complex128[][][])[source]

Dealiasing of a setofvar arrays.

project_fft_on_realX_seq(f_fft)[source]

Project the given field in spectral space such as its inverse fft is a real field.

coarse_seq_from_fft_loc(f_fft, shapeK_loc_coarse)[source]

Return a coarse field in K space.

compute_increments_dim1(var, irx)[source]

Compute the increments of var over the dim 1.

pdf_normalized(field, nb_bins=100)[source]

Compute the normalized pdf

pxffft_from_fft(f_fft)[source]

Return the gradient of f_fft in spectral space.

pyffft_from_fft(f_fft)[source]

Return the gradient of f_fft in spectral space.

laplacian_fft(a_fft, order=2, negative=False)[source]

Compute the n-th order Laplacian, $$\nabla^{n} \hat{a}$$

Parameters:
a_fftndarray
order: int, {2, 4, 8}, optional

Order of the Laplacian operator

negative: bool, optional

Negative of the result.

invlaplacian_fft(a_fft, order=2, negative=False)[source]

Compute the n-th order inverse Laplacian, $$\nabla^{-n} \hat{a}$$

Parameters:
a_fftndarray
order: int, {2, 4, 8}, optional

Order of the inverse Laplacian operator.

negative: bool, optional

Negative of the result.

put_coarse_array_in_array_fft(arr_coarse, arr, oper_coarse, shapeK_loc_coarse)[source]

Put the values contained in a coarse array in an array.

Both arrays are in Fourier space.

Functions

 compute_increments_dim1(var, irx) Compute the increments of var over the dim 1. invlaplacian_fft(a_fft, Kn_not0, rank) Compute the n-th order inverse Laplacian. laplacian_fft(a_fft, Kn) Compute the n-th order Laplacian.

Classes