Look into Sundials for time integration