An introduction to the grid method