tree_d_3d.kernels.cart_m2l_host.cart_m2l_host_pyccel
The Pyccel version (CPU) of the cart_m2l_host kernel of the Coulomb FMM.
cart_m2l_host_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).
Functions
| Name | Description |
|---|---|
cart_m2l_host | Add the expansions of cells sources[row_start[n]:row_start[n + 1]] to cell n. |
cart_m2l_hostfunction#
def cart_m2l_host(row_start: int64[:], sources: int64[:], dst_center: float[:, :], src_center: float[:, :], moments: float[:, :], softening: float, ex: int64[:], ey: int64[:], rec: int64[:, :], m2l: int64[:, :], m2l_coef: float[:], local: float[:, :]) -> NoneAdd the expansions of cells sources[row_start[n]:row_start[n + 1]] to cell n.
For t = c_dst - c_src the Taylor coefficients A_g(t) of the softened kernel
follow from the recurrence on rec; then T_b += m2l_coef * m_a * A_g over the
rows (b, a, g) of m2l. Each destination cell is written by its own row only
(chunks of 64 cells share their scratch).