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:
GKOutputArgsUtility 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
coordsTuple containing the names of each supplied field (those that aren't
None).Units of
[nref * rhoref / lref)]The dimensionality of the moments.
namesNames of all quantities held by this dataclass
shapeShape of quantities.
Units of
[tref * rhoref / lref]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:
- Parameters:
name (str)
- velocity: Optional[ArrayLike] = None#
Units of
[vref * rhoref / lref]