fluidsim.operators.operators3d

Operators 3d (fluidsim.operators.operators3d)

Provides

class fluidsim.operators.operators3d.OperatorsPseudoSpectral3D(params=None)[source]

Bases: fluidfft.fft3d.operators.OperatorsPseudoSpectral3D, fluidsim.operators.base.OperatorBase

Provides fast Fourier transform functions and 3D operators.

Uses fft operators that implement the methods:

  • ifft

  • fft

  • get_shapeX_loc

  • get_shapeX_seq

  • get_shapeK_loc

  • get_shapeK_seq

  • get_dimX_K

  • get_seq_indices_first_K

  • get_k_adim_loc

  • sum_wavenumbers

  • build_invariant_arrayK_from_2d_indices12X

static _complete_params_with_default(params)[source]

This static method is used to complete the params container.

build_invariant_arrayX_from_2d_indices12X(self, arr2d, oper2d=None)[source]

Build a 3D array from a 2D array

build_invariant_arrayK_from_2d_indices12X(self, arr2d)[source]

Build a 3D array from a 2D array

dealiasing(self, *args)[source]

Dealiasing of SetOfVariables or np.ndarray

put_coarse_array_in_array_fft(self, 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.

coarse_seq_from_fft_loc(self, f_fft, shapeK_loc_coarse)[source]

Return a coarse field in K space.

where_is_wavenumber(self, ik0, ik1, ik2)[source]

Give local indices and rank from the sequential indices

urudfft_from_vxvyfft(self, vx_fft: transonic.typing.Array_complex128_3d, vy_fft: transonic.typing.Array_complex128_3d)[source]

Compute toroidal and poloidal horizontal velocities.

urx_fft, ury_fft contain shear modes!

divhfft_from_vxvyfft(self, vx_fft: transonic.typing.Array_complex128_3d, vy_fft: transonic.typing.Array_complex128_3d)[source]

Compute the horizontal divergence in spectral space.

_ikxyzseq_from_ik012rank(self, ik0, ik1, ik2, rank=0)[source]

Give the sequential indices (xyz) from the local indices and the rank

_ik012rank_from_ikxyzseq(self, ikx, iky, ikz)[source]

Give the local indices and the rank from “sequential” indices (xyz)

_kadim_from_ikxyzseq(self, ikx, iky, ikz)[source]

Give the adimensional wavenumbers from sequential indices

_ikxyzseq_from_kadim(self, kx_adim, ky_adim, kz_adim)[source]

Give the sequential indices from the adimensional wavenumbers

kadim_from_ik012rank(self, ik0, ik1, ik2, rank=0)[source]

Give the adimensional wavenumbers from local indices and rank

ik012rank_from_kadim(self, kx_adim, ky_adim, kz_adim)[source]

Give the local indices and rank from the adimensional wavenumbers

set_value_spect(self, arr_fft, value, kx_adim, ky_adim, kz_adim, from_rank=0)[source]

Set a value in a spectral array given the adimensional wavenumber

get_value_spect(self, arr_fft, kx_adim, ky_adim, kz_adim, to_rank=0)[source]

Get a value in a spectral array given the adimensional wavenumber

Functions

compute_energy_from_1field(arr)

dealiasing_setofvar(sov, where_dealiased)

dealiasing_setofvar_numpy(sov, where_dealiased)

dealiasing_variable(ff_fft, where_dealiased)

dealiasing_variable_numpy(ff_fft, …)

Classes

OperatorsPseudoSpectral3D([params])

Provides fast Fourier transform functions and 3D operators.