Add simple adaptive timestepping
Description
Some models have dynamics that simply cannot be modelled with homogeneous timesteps. Inappropriate timesteps cause Newton method to fail, to require a lot of iterations, or to be done in small timesteps when a bigger one suffices.
Proposal
The idea is to add a simple adaptive timestep algorithm that decreases the current timestep and increases the number of maximum Newton iterations when the Newton solver fails to converge and the country otherwise.
How to test the implementation?
Design a test case that fails to solve with homogeneous timesteps, and use it with the new algorithm.
Related issues
None.