# yt.utilities.lib.amr_kdtools module¶

AMR kD-Tree Cython Tools

class yt.utilities.lib.amr_kdtools.Node

Bases: object

add_grids()
add_pygrid()

The entire purpose of this function is to move everything from ndarrays to internal C pointers.

breadth_traverse()

Yields a breadth-first traversal of the kd tree always going to the left child before the right.

create_split()
data
depth_first_touch()

Yields a depth-first traversal of the kd tree always going to the left child before the right.

depth_traverse()

Yields a depth-first traversal of the kd tree always going to the left child before the right.

dirty
find_node()

Find the AMRKDTree node enclosing a position

get_left_edge()
get_right_edge()
get_split_dim()
get_split_pos()
grid
kd_is_leaf()
kd_node_check()
kd_sum_volume()
kd_traverse()
left
node_id
node_ind
parent
print_me()
right
set_dirty()
set_left_edge()
set_right_edge()
viewpoint_traverse()

Yields a viewpoint dependent traversal of the kd-tree. Starts with nodes furthest away from viewpoint.

yt.utilities.lib.amr_kdtools.step_depth()

Takes a single step in the depth-first traversal

yt.utilities.lib.amr_kdtools.step_viewpoint()

Takes a single step in the viewpoint based traversal. Always goes to the node furthest away from viewpoint first.