11 Ordinary differential equations

11.1 Overview

To use these functionalities, you should include pnl/pnl_integration.h.

These functions are designed for numerically solving n-dimensional first order ordinary differential equation of the general form

dyi(t) = fi(t,y1(t),⋅⋅⋅ ,yn(t))
dt

The system of equations is defined by the following structure

typedef struct 
{ 
  void (*F) (int neqn, double t, const double *y, double *yp, void *params); 
  int neqn; 
  void *params; 
} PnlODEFunc ;

We provide the following macro to evaluate a PnlODEFunc at a given point

#define PNL_EVAL_ODEFUNC(Fstruct, t, y, yp) \ 
    (*((Fstruct)->F))((Fstruct)->neqn, t, y, yp, (Fstruct)->params)

11.2 Functions