Finite integration method for solving multi-dimensional partial differential equations