tree_d_3d.kernels.evaluate_groups.evaluate_groups_pyccel
The Pyccel version (CPU) of the evaluate_groups kernel of the Barnes-Hut walk.
evaluate_groups_numpy.py next to this file is the version for machines without
Pyccel, with the same arguments; the folder’s __init__.py declares the kernel (see
tree_d_3d.kernels). The flat quadtree is described in tree_d_3d.flat_tree.
Functions
| Name | Description |
|---|---|
evaluate_groups | Potential and field at the targets, without k_e, walking the tree by groups. |
evaluate_groupsfunction#
def evaluate_groups(targets: float[:, :], exclude: int64[:], group_start: int64[:], log_kernel: int, with_potential: int, spos: float[:, :], scharge: float[:], sindex: int64[:], node_center: float[:, :], node_half: float[:], node_start: int64[:], node_end: int64[:], node_child: int64[:], node_q: float[:], node_qabs: float[:], node_p: float[:, :], node_s: float[:, :], moment_re: float[:, :], moment_im: float[:, :], theta: float, softening: float, stack_size: int, phi: float[:], field: float[:, :]) -> NonePotential and field at the targets, without k_e, walking the tree by groups.
The targets of group g are group_start[g]:group_start[g + 1] (at most 62).
spos, scharge and sindex are the sources’ positions, charges and
indices in tree order (perm); exclude[i] is a source index skipped for
target i. log_kernel 0 is the Coulomb walk of evaluate_quadtree
(moments node_q, node_p, node_s), 1 the line-charge walk of
evaluate_log_quadtree (moment_re, moment_im); with_potential 0
skips the line-charge potential (its logarithms), leaving phi zero. A target that meets an
unsoftened coincident charge gets phi = 1e300.