pub fn density_accumulation(
positions: &[[f64; 3]],
masses: &[f64],
h: f64,
neighbor_list: &NeighborList,
) -> Vec<f64>Expand description
Accumulate density contributions from a neighbour list.
For each particle i, sums contributions from its neighbours j:
rho_i += m_j * W(|r_i - r_j|, h)
Only pairs within distance h contribute. The neighbour list is expected
to already be built for the given positions.