updated 1-d temperature diffusion with sparse solver