This is the grid structure as Enzo sees it, with some added bonuses.
It’s primarily used as a class factor, to generate data objects and
access grids.
It should never be created directly – you should always access it via
calls to an affiliated EnzoStaticOutput.
On instantiation, it processes the hierarchy and generates the grids.
-
export_boxes_pv(filename)
- Exports the grid structure in partiview text format.
-
export_particles_pb(filename, filter=1, indexboundary=0, fields=None, scale=1.0)
- Exports all the star particles, or a subset, to pb-format filename
for viewing in partiview. Filters based on particle_type=*filter*,
particle_index>=*indexboundary*, and exports fields, if supplied.
Otherwise, index, position(x,y,z). Optionally scale by a given
factor before outputting.
-
findMax(field, finestLevels=True)
- Returns (value, center) of location of maximum for a given field.
-
find_max(field, finestLevels=True)
- Returns (value, center) of location of maximum for a given field.
-
find_min(field)
- Returns (value, center) of location of minimum for a given field
-
find_point(coord)
- Returns the (objects, indices) of grids containing an (x,y,z) point
-
find_ray_grids(coord, axis)
- Returns the (objects, indices) of grids that an (x,y) ray intersects
along axis
-
find_slice_grids(coord, axis)
- Returns the (objects, indices) of grids that a slice intersects along
axis
-
find_sphere_grids(center, radius)
- Returns objects, indices of grids within a sphere
-
get_box_grids(left_edge, right_edge)
- Gets back all the grids between a left edge and right edge
-
get_data(node, name)
- Return the dataset with a given name located at node in the
datafile.
-
get_smallest_dx()
- Returns (in code units) the smallest cell size in the simulation.
-
print_stats()
- Prints out (stdout) relevant information about the simulation
-
save_data(array, node, name, set_attr=None, force=False)
- Arbitrary numpy data will be saved to the region in the datafile
described by node and name. If data file does not exist, it throws
no error and simply does not save.
-
select_grids(level)
- Returns an array of grids at level.