src.fourier#

Classes

f_trans(nhar_i, nhar_j)

Fourier transformer class

class src.fourier.f_trans(nhar_i, nhar_j)#

Fourier transformer class

__init__(nhar_i, nhar_j)#

Initalises a discrete spectral space with the corresponding Fourier coefficients spanning nhar_i and nhar_j.

Parameters#

nhar_iint

number of spectral modes in the first horizontal direction

nhar_jint

number of spectral modes in the second horizontal direction

set_kls(k_rng, l_rng, recompute_nhij=True, components='imag')#

Method to select a smaller subset of the dense spectral space, e.g., in the Second Approximation step of the algorithm if the First Approximation is computed with a fast-Fourier transform.

Parameters#

k_rnglist

list containing the selected k-wavenumber indices

l_rnglist

list containing the selected k-wavenumber indices

recompute_nhijbool, optional

resets nhar_i and nhar_j, by default True

componentsstr, optional

real recomputes the spectral space comprising only real spectral components, by default ‘imag’

do_full(cell, grad=False)#

Assembles the sine and cosine terms that make up the Fourier coefficients in the M matrix required in the linear regression computation:

\[M a_m =h\]

Parameters#

cellsrc.var.topo_cell instance

cell object instance

gradbool, optional

deprecated argument, by default False

do_axial(cell, alpha=0.0)#

Computes spectral modes along the (k,l)-axes.

Deprecated since version 0.90.0.

do_cg_spsp(cell)#

Computes the coarse-grained sparse spectral space

Deprecated since version 0.90.0.

get_freq_grid(a_m)#

Assembles a dense representation of the sparse spectral space given the Fourier amplitudes computed in the linear regression step.

Parameters#

a_mlist

list of (sparse) Fourier amplitudes