yt.frontends.stream.data_structures.load_hexahedral_mesh

yt.frontends.stream.data_structures.load_hexahedral_mesh(data, connectivity, coordinates, length_unit=None, bbox=None, sim_time=0.0, mass_unit=None, time_unit=None, velocity_unit=None, magnetic_unit=None, periodicity=(True, True, True), geometry='cartesian')[source]

Load a hexahedral mesh of data into yt as a StreamHandler.

This should allow a semistructured grid of data to be loaded directly into yt and analyzed as would any others. This comes with several caveats:

  • Units will be incorrect unless the data has already been converted to cgs.
  • Some functions may behave oddly, and parallelism will be disappointing or non-existent in most cases.
  • Particles may be difficult to integrate.

Particle fields are detected as one-dimensional fields. The number of particles is set by the “number_of_particles” key in data.

Parameters:

data : dict

This is a dict of numpy arrays, where the keys are the field names. There must only be one. Note that the data in the numpy arrays should define the cell-averaged value for of the quantity in in the hexahedral cell.

connectivity : array_like

This should be of size (N,8) where N is the number of zones.

coordinates : array_like

This should be of size (M,3) where M is the number of vertices indicated in the connectivity matrix.

bbox : array_like (xdim:zdim, LE:RE), optional

Size of computational domain in units of the length unit.

sim_time : float, optional

The simulation time in seconds

mass_unit : string

Unit to use for masses. Defaults to unitless.

time_unit : string

Unit to use for times. Defaults to unitless.

velocity_unit : string

Unit to use for velocities. Defaults to unitless.

magnetic_unit : string

Unit to use for magnetic fields. Defaults to unitless.

periodicity : tuple of booleans

Determines whether the data will be treated as periodic along each axis

geometry : string or tuple

“cartesian”, “cylindrical”, “polar”, “spherical”, “geographic” or “spectral_cube”. Optionally, a tuple can be provided to specify the axis ordering – for instance, to specify that the axis ordering should be z, x, y, this would be: (“cartesian”, (“z”, “x”, “y”)). The same can be done for other coordinates, for instance: (“spherical”, (“theta”, “phi”, “r”)).