Generalize 2d diffusion to arbitrary mesh size.