powered by
A function to compute the neighbours of a cell on a toral grid
neigh2D(i, j, ns, M, N)
cell index i
cell index j
number of neighbours either side
size of grid in x direction
size of grid in y direction
the cell indices of the neighbours