Numerical method of lines for the solution of nonlinear partial differential equations