Skip to content
Projects

tree_d_3d.kernels.quadtree_quadrants.quadtree_quadrants_pyccel

The Pyccel version (CPU) of the quadtree_quadrants kernel of the Barnes-Hut and FMM solvers.

quadtree_quadrants_cuda.cu next to this file is the CUDA version (GPU) and quadtree_quadrants_numpy.py the version for machines without Pyccel, all with the same arguments; the folder’s __init__.py declares the kernel (see :mod:tree_d_3d.kernels). The flat quadtree is described in :mod:tree_d_3d.flat_tree.

Functions

NameDescription
quadtree_quadrantsOne level of the tree build: the child quadrant of every sorted particle.

quadtree_quadrantsfunction#

def quadtree_quadrants(pos: float[:, :], perm: int64[:], slot_node: int64[:], node_center: float[:, :], node_child: int64[:], quadrant: int64[:]) -> None

One level of the tree build: the child quadrant of every sorted particle.

Slot k holds particle perm[k] in node slot_node[k]. quadrant[k] becomes -1 if that node does not split (node_child < 0), and otherwise 0..3 for the upper left, upper right, lower left and lower right child.