Information on auto-switching solvers

I just want to know more about how the auto-switching algorithms in DifferentialEquations work. For example,

  • when do they switch from non-stiff to stiff solver ?
  • when do they switch back ?
  • what happens to switching, when the corresponding integrator object is reinitialized by calling reinit!

Can someone point me to where I can find this information?
Thanks in advance,


They use an internal Jacobian eigenvalue estimate to estimate the stiffness. They switch back and forth depending on the choice of switcher method in the CompositeAlgorithm, which for things like AutoTsit5 assumes the other method is for stiff equations and thus switches back and forth depending on whether it’s detecting stiffness. It’s a single integrator dual cache object so fsalfirst is shared, meaning that there’s no reinitialization happening with a switch. The best thing to do right now is to look at the code. We’ll try and write it down probably within a year.

1 Like

Sorry for the late response - been busy! Having documentation of this would be great, but for now looking at the code will be fine :slight_smile: