Skip to content
Projects

tree_d_3d.kernels.pair_energy.pair_energy_numpy

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

Vectorized over blocks of particles against the later ones; the same arguments and results as pair_energy_pyccel.py.

Attributes

NameDescription
CHUNKNo description.

Functions

NameDescription
pair_energyAdd the exact sum of q_i q_j / sqrt(r2 + eps2) over pairs, without

CHUNKattributemodule attribute#

CHUNK = 256

pair_energyfunction#

def pair_energy(pos: np.ndarray, charge: np.ndarray, softening: float, status: np.ndarray, energy: np.ndarray) -> None

Add the exact sum of q_i q_j / sqrt(r2 + eps2) over pairs, without k_e, to energy[0]; status[0] is 1 for coincident unsoftened charges.