tree_d_3d.kernels.cart_moments_upward.cart_moments_upward_pyccel
The Pyccel version (CPU) of the cart_moments_upward kernel of the Coulomb FMM.
cart_moments_upward_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_moments_upward | Moments m_g = sum_j q_j (r_j - c)^g of every node, |g| <= p. |
cart_moments_upwardfunction#
def cart_moments_upward(pos: float[:, :], charge: float[:], perm: int64[:], levels: int64[:], node_center: float[:, :], node_start: int64[:], node_end: int64[:], node_child: int64[:], mono_parent: int64[:], mono_dir: int64[:], shift: int64[:, :], shift_coef: float[:], moments: float[:, :]) -> NoneMoments m_g = sum_j q_j (r_j - c)^g of every node, |g| <= p.
levels[d]:levels[d + 1] are the nodes at depth d. Leaves sum their
particles; a parent adds each child’s moments shifted by s = c_child - c,
m_g += sum_b C(g, b) m_b(child) s^(g - b) (rows shift). Levels are done from
the deepest up; the nodes of a level are independent.