fluidsim.base.sphericalharmo.state

State of the variables (fluidsim.base.sphericalharmo.state)

Provides:

class fluidsim.base.sphericalharmo.state.StateSphericalHarmo(sim, oper=None)[source]

Bases: StatePseudoSpectral

Contains the state variables and handles the access to fields.

This is the general class for the pseudo-spectral solvers base on the Sperical harmonic transform.

Warning

We assume incompressibility (div = 0) in this base class!

static _complete_info_solver(info_solver)[source]

Static method to complete the ParamContainer info_solver.

compute(key, SAVE_IN_DICT=True, RAISE_ERROR=True)[source]

Compute and return a variable

statephys_from_statespect()[source]

Compute state_phys from statespect.

statespect_from_statephys()[source]

Compute state_spect from state_phys.

init_from_rotsh(rot_sh)[source]

Initialize the state from the variable rot_sh.

init_statespect_from(**kwargs)[source]

Initialize state_spect from arrays.

Parameters:
**kwargs{key: array, …}

keys and arrays used for the initialization. The other keys are set to zero.

Examples

kwargs = {'a_fft': Fa_fft}
init_statespect_from(**kwargs)

ux_fft, uy_fft, eta_fft = oper.uxuyetafft_from_qfft(q_fft)
init_statespect_from(ux_fft=ux_fft, uy_fft=uy_fft, eta_fft=eta_fft)

Classes

StateSphericalHarmo(sim[, oper])

Contains the state variables and handles the access to fields.