Cells. Divide the domain into M=Mx*My cells, each a bit larger than the
interaction cut-off distance. Construct two arrays. A Head-of-List array
is M elements big. HoL(k) gives the first particle in cell k.
The List array is a linked list containing all the other particles. That is,
say HoL(k)=8. That means particle 8 is in cell k. Look in List(8)=12, say.
So particle 12 is in cell k, and in List(12) is the next particle in cell k.
This continues until List(.)=0, signifying the end of the list for that cell.
Note that, when computing hte force, one needs only search over the cells on one
side of the given cell, and only over particles "below" the given one.