yt.data_objects.construction_data_containers.YTArbitraryGridBase

class yt.data_objects.construction_data_containers.YTArbitraryGridBase(left_edge, right_edge, dims, ds=None, field_parameters=None)[source]

A 3D region with arbitrary bounds and dimensions.

In contrast to the Covering Grid, this object accepts a left edge, a right edge, and dimensions. This allows it to be used for creating 3D particle deposition fields that are independent of the underlying mesh, whether that is yt-generated or from the simulation data. For example, arbitrary boxes around particles can be drawn and particle deposition fields can be created. This object will refuse to generate any fluid fields.

Parameters:

left_edge : array_like

The left edge of the region to be extracted

right_edge : array_like

The left edge of the region to be extracted

dims : array_like

Number of cells along each axis of resulting grid.

Examples

>>> obj = ds.arbitrary_grid([0.0, 0.0, 0.0], [0.99, 0.99, 0.99],
...                          dims=[128, 128, 128])

Attributes

Methods