Definitions

These are a bunch of Enums, sizes, and slices used frequently in pyharm. Generally users will only need to know about Loci.

Definitions of enums used throughout pyharm, and common slices to make vectorized operations a bit more readable.

Some of this is pretty old.

class pyharm.defs.FloorFlag_KHARMA

Floor codes are non-exclusive, so it makes little sense to use a straight Enum. Instead, we use bitflags, starting high enough that we can stick the enum in the bottom 5 bits See floors.hpp in KHARMA for explanations of the flags

class pyharm.defs.FloorFlag_iharm3d

Bit masks for HARM floor codes.

class pyharm.defs.InversionStatus

Enum denoting U to P inversion status. See e.g. u_to_p.hpp in KHARMA for documentation.

class pyharm.defs.Loci

Location enumerated value. Locations are defined by:

^ theta
|----------------------
|                     |
|                     |
|FACE1     CENT       |
|                     |
|CORN      FACE2      |
-------------------------> R

And FACE3 as the plane in phi. Several items in Grid are indexed by location. To retrieve the one you want, use e.g. Loci.CENT.value as the first index.

class pyharm.defs.Shapes(G, params)

Shape of the geometry, and the grid with & without ghost zones. Adheres to the same “bulk” naming as above for versions excluding ghost zones.

class pyharm.defs.Slices(ng)

Object to hold a bunch of named slices. The “bulk” fluid is the physical zones only, without any of the surrounding “ghost” zones obtained from other MPI ranks. When parts of the set of ghost zones are used, they’re called a “halo”

geom_slc(slc)

Return the version of a 3D slice suitable for 2D geometry variables