Skip to content
Projects

tree_d_3d.kernels.log_targets_host.log_targets_host_pyccel

The Pyccel version (CPU) of the log_targets_host kernel of the FMM at targets.

log_targets_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

NameDescription
log_targets_hostLine-charge potential and field at the targets, in target-tree order.

log_targets_hostfunction#

def log_targets_host(tpos: float[:, :], texclude: int64[:], t_count: int, t_center: float[:, :], t_start: int64[:], t_end: int64[:], t_child: int64[:], local_re: float[:, :], local_im: float[:, :], row_start: int64[:], partners: int64[:], spos: float[:, :], scharge: float[:], sindex: int64[:], s_start: int64[:], s_end: int64[:], softening: float, with_potential: int, phi: float[:], field: float[:, :]) -> None

Line-charge potential and field at the targets, in target-tree order.

A target leaf n evaluates its local expansion (phi = -2 Re W, E_x - i E_y = 2 W') and sums the source leaves partners[row_start[n]:row_start[n + 1]] exactly, skipping source texclude[i] (an index of sindex). with_potential 0 leaves phi zero. A target that meets an unsoftened coincident charge gets phi = 1e300.