#ifndef _DVERK_H
#define _DVERK_H

#include "f_eval.h"

typedef struct _dverk
{
    F_EVAL F;
    int N, IND, NW;
    double T, *Y, TOL, *C, *W;
} DVERK;

/*
** DVERK is a 5/6 pair Runge-Kutta method.  This is the original DVERK, with
** no defect control and no continuous solution, written by Hull, Enright,
** and Jackson, 1/10/1976.
**
** n = number of equations.
** time = initial time.
** y = pointer to your array of n state variables.
** f = function of yours that computes ydot
** eps = allowable relative error.
**
** stiff_flag must be 0, and zero must 0.0.
*/ 
DVERK *DverkAlloc(int n, double time, double *y, F_EVAL f,
    int stiff_flag, double eps, double zero);

/* Do the actual integration.  Return the actual TOUT */
double DverkIntegrate(DVERK *r, double TOUT);

void DverkFree(DVERK *d);

#endif  /* _DVERK_H */
