Write a function that takes the size of the grid N , and the matrix indices i and j
as input, and returns an array containing the coordinates of the four nearest neighbors.
Remember to account for the periodic boundary conditions as described in subsection
Write a function that takes the size of the grid N , and the matrix indices i and j as input, and returns an array containing the coordinates of the four nearest neighbors. Remember to account for the periodic boundary conditions as described in subsection