add assertions for 2d diffusion and matmat