# cvode_with_preconditioning.py¶

assimulo.examples.cvode_with_preconditioning.run_example(with_plots=True)[source]

Example to demonstrate the use of a preconditioner

$\begin{split}\dot y_1 & = 2 t \sin y_1 + t \sin y_2 \\ \dot y_2 & = 3 t \sin y_1 + 2 t \sin y_2\end{split}$

on return:

• exp_mod problem instance
• exp_sim solver instance

Final Run Statistics: Example of using a preconditioner in SUNDIALS

Number of steps                                 : 62
Number of function evaluations                  : 85
Number of Jacobian*vector evaluations           : 75
Number of function eval. due to Jacobian eval.  : 75
Number of error test failures                   : 3
Number of nonlinear iterations                  : 81
Number of nonlinear convergence failures        : 0
Number of pre-conditioner solves                : 139
Number of pre-conditioner setups                : 2

Solver options:

Solver                   : CVode
Linear multistep method  : BDF
Nonlinear solver         : Newton
Linear solver type       : SPGMR
Maximal order            : 5
Tolerances (absolute)    : 1e-05
Tolerances (relative)    : 1e-05

Simulation interval    : 0.0 - 5.0 seconds.
Elapsed simulation time: 0.00680184364319 seconds.


Note

Press [source] (to the top right) to view the example.