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
| Name | Description |
|---|---|
CHUNK | No description. |
Functions
| Name | Description |
|---|---|
direct_sum | All-pairs potential and field at targets; same conventions as the tree. |
CHUNKattributemodule attribute#
CHUNK = 256direct_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) -> NoneAll-pairs potential and field at targets; same conventions as the tree.
status[0] becomes 1 + a target that met an unsoftened coincident charge.