Numerical solution of heat equation