/*********************************************************************** * FILENAME: odes.h * * * * PROGRAMMER: Izzi Urieli * * * * DATE: 12/27/94 * * * * DESCRIPTION: * * integrate the vector of first order ordinary differential equations * ***********************************************************************/ /* SYMBOLIC CONSTANTS: */ #define NEQU 25 /* maximum number of first order differential equations in the set */ /* FUNCTION PROTOTYPES: */ void euler(void deriv(double x, double y[], double dy[]), int n, double *x, double dx, double y[], double dy[]); /* the simple first order Euler method */ void rk4(void deriv(double x, double y[], double dy[]), int n, double *x, double dx, double y[], double dy[]); /* Classical fourth order Runge-Kutta method */ /* deriv evaluates the derivative vector dy = fun(y,x) (supplied by the user) y is the solution vector dy is the derivative vector x, dx is the independent variable, increment n is the actual number of equations in the set. */