tree_d_3d.kernels.direct_sum.direct_sum_pyccel
The Pyccel version (CPU) of the direct_sum kernel of the Barnes-Hut and FMM solvers.
direct_sum_cuda.cu next to this file is the CUDA version (GPU) and direct_sum_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
| Name | Description |
|---|---|
direct_sum | All-pairs potential and field at targets; same conventions as the tree. |
direct_sumfunction#
def direct_sum(targets: float[:, :], exclude: int64[:], pos: float[:, :], charge: float[:], softening: float, phi: float[:], field: float[:, :], status: int64[:]) -> NoneAll-pairs potential and field at targets; same conventions as the tree.
status[0] becomes 1 + a target that met an unsoftened coincident charge.