The pairwise distance between all particles in the cell and in one of the neighbouring cells is computed.
The distance between each pair of particles within a cell and in an adjacent cell is calculated.