FluidSpecialValueSpecifier

class PlasmaCalcs.dimensions.fluids.FluidSpecialValueSpecifier(getter, name=None, *args_super, iseler=None, **kw_super)

Bases: Sentinel, DimensionSpecialValueSpecifier

class to specify special values for FluidDimension.

E.g. fluids.get(ELECTRON) is equivalent to fluids.get_electron().
E.g. (fluid_dim.v = IONS) is equivalent to (fluid_dim.v = fluid_dim.values.get_electron())
getter: str
self specifies to use the value(s): fluids.{getter}().
name: str
name of this object; will only be used in repr.
iseler: None or str
self specifies to use (during xarray_isel or xarray_sel) indexes: fluids.{iseler}()
additional args & kw go to Sentinel.__new__

Methods

_getter_as_str()

returns str representation of self.getter.

_getter_from_str(dlist)

get the value from dlist specified by str self.getter.

_iseler_as_str()

returns str representation of self.iseler.

_iseler_from_str(dvals)

get the indexes from dlist specified by str self.iseler.

_iseler_when_none(dvals)

crash, because self was passed to xarray_isel or xarray_sel but self.iseler is None.

_repr_contents()

contents for repr; used by __repr__.

_getter_as_str()

returns str representation of self.getter.

Use self.init_getter if it exists, else self.getter if it exists, else ‘UNKNOWN_GETTER’.
_getter_from_str(dlist)

get the value from dlist specified by str self.getter.

_iseler_as_str()

returns str representation of self.iseler.

Use self.init_iseler if it exists, else self.iseler if it exists, else ‘UNKNOWN_ISELER’.
_iseler_from_str(dvals)

get the indexes from dlist specified by str self.iseler.

_iseler_when_none(dvals)

crash, because self was passed to xarray_isel or xarray_sel but self.iseler is None.

_repr_contents()

contents for repr; used by __repr__.

isel_cls

alias of FluidList