tree_d_3d.kernels.fmm_evaluate.fmm_evaluate_pyccel
The Pyccel version (CPU) of the fmm_evaluate kernel of the Barnes-Hut and FMM solvers.
fmm_evaluate_cuda.cu next to this file is the CUDA version (GPU) and fmm_evaluate_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 |
|---|---|
fmm_evaluate | Far field from leaf local expansions plus exact mutual near field. |
fmm_evaluatefunction#
def fmm_evaluate(pos: float[:, :], charge: float[:], perm: int64[:], node_count: int, node_center: float[:, :], node_start: int64[:], node_end: int64[:], node_child: int64[:], local_re: float[:, :], local_im: float[:, :], pairs: int64[:, :], count: int, softening: float, with_potential: int, phi: float[:], field: float[:, :], status: int64[:]) -> NoneFar field from leaf local expansions plus exact mutual near field.
Every particle is a target; self-interaction is excluded. With
with_potential = 0 the near-field potential is skipped, which saves
a logarithm per pair when only forces are needed. status[0] becomes
1 + a particle that met an unsoftened coincident charge.