Skip to content
Projects

tree_d_3d.kernels.fmm_m2l.fmm_m2l_pyccel

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

fmm_m2l_cuda.cu next to this file is the CUDA version (GPU) and fmm_m2l_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
fmm_m2lAdd each pair's multipole of one cell to the other's local expansion.

fmm_m2lfunction#

def fmm_m2l(pairs: int64[:, :], count: int, node_center: float[:, :], moment_re: float[:, :], moment_im: float[:, :], binomial: float[:, :], symmetric: int, inv_re: float[:], inv_im: float[:], local_re: float[:, :], local_im: float[:, :]) -> None

Add each pair’s multipole of one cell to the other’s local expansion.

symmetric nonzero truncates the translated series by total degree (k + l <= p, Dehnen’s symmetric truncation) instead of k <= p and l <= p: the pair interaction then depends on z_i - z_j only, so the forces of a mutual pair are exactly antisymmetric. inv_re/inv_im are scratch buffers of length 2 p + 2.