Heat equation solver on a lattice