Skip to content
Projects

tree_d_3d.kernels.direct_sum.direct_sum_numpy

The NumPy version of the direct_sum kernel, for machines without Pyccel.

Vectorized over blocks of targets and all sources; the same arguments and results as direct_sum_pyccel.py.

Attributes

NameDescription
CHUNKNo description.

Functions

NameDescription
direct_sumAll-pairs potential and field at targets; same conventions as the tree.

CHUNKattributemodule attribute#

CHUNK = 256

direct_sumfunction#

def direct_sum(targets: np.ndarray, exclude: np.ndarray, pos: np.ndarray, charge: np.ndarray, softening: float, phi: np.ndarray, field: np.ndarray, status: np.ndarray) -> None

All-pairs potential and field at targets; same conventions as the tree.

status[0] becomes 1 + a target that met an unsoftened coincident charge.