Skip to content
Projects

tree_d_3d.kernels.fmm_evaluate.fmm_evaluate_metal

The Metal version (Apple-silicon GPU, float32) of the fmm_evaluate kernel.

fmm_evaluate_pyccel.py next to this file is the CPU version with the same arguments. One thread per leaf (far field) and per pair (exact near field) adds into zeroed atomic float32 delta arrays (see :mod:tree_d_3d.kernels._metal_atomic); the host adds those to phi and field in float64. An unsoftened coincident charge sets status[0] to a failing particle + 1 (the first failing thread’s; the other threads still run). See :mod:tree_d_3d.kernels._metal for the float32 caveats.

Functions

NameDescription
fmm_evaluateFar field from the leaf local expansions plus the exact mutual near field.

fmm_evaluatefunction#

def fmm_evaluate(pos: Array, charge: Array, perm: Array, node_count: int, node_center: Array, node_start: Array, node_end: Array, node_child: Array, local_re: Array, local_im: Array, pairs: Array, count: int, softening: float, with_potential: int, phi: Array, field: Array, status: Array) -> None

Far field from the leaf local expansions plus the exact mutual near field.