assimulo.examples.cvode_with_disc.
run_example
(with_plots=True)[source]¶Example of the use of CVode for a differential equation with a iscontinuity (state event) and the need for an event iteration.
on return:
- exp_mod problem instance
- exp_sim solver instance
No initialization defined for the problem.
A discontinuity occured at t = 1.000000e+00.
Current switches: [False, True, True]
Event info: [[0, 0, -1], False]
Final Run Statistics: ODE with discontinuities and a function with consistency problem
Number of steps : 6
Number of function evaluations : 10
Number of Jacobian evaluations : 1
Number of function eval. due to Jacobian eval. : 3
Number of error test failures : 0
Number of nonlinear iterations : 6
Number of nonlinear convergence failures : 0
Number of state function evaluations : 8
Number of state events : 1
Solver options:
Solver : CVode
Linear multistep method : BDF
Nonlinear solver : Newton
Linear solver type : DENSE
Maximal order : 5
Tolerances (absolute) : 1e-06
Tolerances (relative) : 1e-06
No finalization defined for the problem.
Final Run Statistics: ODE with discontinuities and a function with consistency problem
Number of steps : 10
Number of function evaluations : 18
Number of Jacobian evaluations : 2
Number of function eval. due to Jacobian eval. : 6
Number of error test failures : 0
Number of nonlinear iterations : 10
Number of nonlinear convergence failures : 0
Number of state function evaluations : 14
Number of state events : 1
Solver options:
Solver : CVode
Linear multistep method : BDF
Nonlinear solver : Newton
Linear solver type : DENSE
Maximal order : 5
Tolerances (absolute) : 1e-06
Tolerances (relative) : 1e-06
Simulation interval : 0.0 - 10.0 seconds.
Elapsed simulation time: 0.010479927063 seconds.
Time, t = 1.000000e+00
Event info, [[0, 0, -1], False]
Number of events: 1
Note
Press [source] (to the top right) to view the example.