Back

       


Ordinary Differential Equation Solver

The program ODES (Ordinary Differential Equation Solver) is an integrator for nonstiff dynamical first order ordinary differential equations
of the form

   


for $i=1,\dots,n$ and where ${\bf X}_t=(X_t^1,\dots,X_t^n)$. The well tested algorithm is based on a high order Runge-Kutta scheme with an embedded lower order method which is used to control error. Memory is dynamically allocated and released as needed so that the call sequence is simple:

C/C++ call sequence for ODES integrator is

odes(n,t,x,dt,tol);

Fortran call sequence for ODES integrator is

call odes(n,t,x,dt,tol)

 

C/C++Fortrandescription
integer n integer n number of equations
double t[1]real*8 t initial time (set to t+dt on output)
double x[n]real*8 x(n)solutions at time t on input, t+dt on output
double dtreal*8 dt desired time step
double tol real*8 tol desired tolerance

C/C++ user must supply

func(n,t,x,a);        

which returns the derivatives ai declared double a[n]

Fortran user must supply

subroutine func(n,t,x,a)        

which returns the derivatives ai declared real*8 a(n)

Top

* Innovative Stochastic Algorithms *