pyrokinetics.gk_code.gk_output.Moments#

class pyrokinetics.gk_code.gk_output.Moments(density=None, temperature=None, velocity=None, dims=('theta', 'kx', 'species', 'ky', 't'))[source]#

Bases: GKOutputArgs

Utility dataclass type used to pass moments to GKOutput.

__init__(density=None, temperature=None, velocity=None, dims=('theta', 'kx', 'species', 'ky', 't'))#

Methods

__init__([density, temperature, velocity, dims])

items()

Dict-like items iteration

units(name, c)

Return units associated with each moment for a given convention

values()

Dict-like values iteration

with_units(c)

Apply units to each quantity in turn and return a new Coords.

Attributes

coords

Tuple containing the names of each supplied field (those that aren't None).

density

Units of [nref * rhoref / lref)]

dims

The dimensionality of the moments.

names

Names of all quantities held by this dataclass

shape

Shape of quantities.

temperature

Units of [tref * rhoref / lref]

velocity

Units of [vref * rhoref / lref]

density: Optional[ArrayLike] = None#

Units of [nref * rhoref / lref)]

dims: dataclasses.InitVar[Tuple[str, ...]] = ('theta', 'kx', 'species', 'ky', 't')#

The dimensionality of the moments. Each array should have the same dimensionality.

temperature: Optional[ArrayLike] = None#

Units of [tref * rhoref / lref]

units(name, c)[source]#

Return units associated with each moment for a given convention

Return type:

Unit

Parameters:
velocity: Optional[ArrayLike] = None#

Units of [vref * rhoref / lref]