cvode_with_jac.py

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

Example for demonstrating the use of a user supplied Jacobian

ODE:

\[\begin{split}\dot y_1 &= y_2 \\ \dot y_2 &= -9.82\end{split}\]

on return:

  • exp_mod problem instance
  • exp_sim solver instance

Final Run Statistics: Example using analytic Jacobian 

 Number of steps                                 : 18
 Number of function evaluations                  : 22
 Number of Jacobian evaluations                  : 1
 Number of function eval. due to Jacobian eval.  : 0
 Number of error test failures                   : 0
 Number of nonlinear iterations                  : 18
 Number of nonlinear convergence failures        : 0

Solver options:

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

Simulation interval    : 0.0 - 5.0 seconds.
Elapsed simulation time: 0.00593304634094 seconds.
_images/cvode_with_jac.png

Note

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