Computational approach to surface diffusion