.. _choosing_solvers: Choosing a Solver ################# ``odes`` interfaces with a number of different solvers: `CVODE `_ ODE solver with BDF linear multistep method for stiff problems and Adams-Moulton linear multistep method for nonstiff problems. Supports modern features such as: root (event) finding, error control, and (Krylov-)preconditioning. See :py:mod:`scikits.odes.sundials.cvode` for more details and solver specific arguments. Part of SUNDIALS, it is a replacement for the earlier ``vode``/``dvode``. `IDA `_ DAE solver with BDF linear multistep method for stiff problems and Adams-Moulton linear multistep method for nonstiff problems. Supports modern features such as: root (event) finding, error control, and (Krylov-)preconditioning. See :py:mod:`scikits.odes.sundials.ida` for more details and solver specific arguments. Part of SUNDIALS. `dopri5 `_ Part of :py:mod:`scipy.integrate`, explicit Runge-Kutta method of order (4)5 with stepsize control. `dop853 `_ Part of :py:mod:`scipy.integrate`, explicit Runge-Kutta method of order 8(5,3) with stepsize control. ``odes`` also includes for comparison reasons the historical solvers: `lsodi `_ Part of `odepack `_, IDA should be used instead of this. See :py:mod:`scikits.odes.lsodiint` for more details. `ddaspk `_ Part of `daspk `_, IDA should be used instead of this. See :py:mod:`scikits.odes.ddaspkint` for more details. Support for other SUNDIALS solvers (e.g. ARKODE) is currently not implemented, nor is support for non-serial methods (e.g. MPI, OpenMP). Contributions adding support new SUNDIALS solvers or features is welcome. Performance of the Solvers ========================== A comparison of different methods is given in following image. In this BDF, RK23, RK45 and Radau are `python implementations `_; cvode is the CVODE interface included in ``odes``; lsoda, odeint and vode are the `scipy integrators (2016) `_, dopri5 and dop853 are the Runge-Kutta methods in `scipy `_. For this problem, cvode performs fastest at a preset tolerance. .. image:: ../ipython_examples/PerformanceTests.png You can generate above graph via the `Performance notebook `_.