Next: Runge_Kutta4
Up: Miscellaneous
Previous: Miscellaneous
Contents
Subsections
void odeint(ReturnMatrix (*xdot)(Real time, const Matrix & xin),
Matrix & xo,
Real to,
Real tf,
Real eps,
Real h1,
Real hmin,
int & nok,
int & nbad,
RowVector & tout,
Matrix & xout,
Real dtsav);
This function performs the numerical integration of
using an adaptive step size based on
order Runge-Kutta scheme.
It carries out the integration of xdot with the initial conditions given by
xo, from time to to tf with accuracy eps saving the results at
dtsav increments. After the function call,
tout is set as
![$\displaystyle \left[\begin{array}{cccc} t_0 & t_1 & \cdots & t_{nsteps} \end{array}\right]$](img242.gif) |
|
|
(2.77) |
xout as
![$\displaystyle \left[\begin{array}{cccc} \mbox{\boldmath$ x $}_0 & \mbox{\boldmath$ x $}_1 & \cdots & \mbox{\boldmath$ x $}_{nsteps} \end{array}\right]$](img243.gif) |
|
|
(2.78) |
xo as
, nok and nbad to the number of
good and bad steps taken. The function odeint is adapted from [17].
None (xo, tout and xout are modified on output)
Richard Gourdeau
2004-07-06