This is the code I am using to integrate a function indicated by "func_aug" and its jacobian is indicated by "jac_aug". Thus jacobian is required as an argument in the following integrator. Can you suggest me how to get rid of it??
Code:
void ode45(double tStart,double tEnd,int dim,double *x0,int *steps)
{
const gsl_odeiv_step_type *T = gsl_odeiv_step_rkf45;
gsl_odeiv_step *s = gsl_odeiv_step_alloc(T,3);
gsl_odeiv_control *c = gsl_odeiv_control_y_new(1e-10,0.0);
gsl_odeiv_evolve *e = gsl_odeiv_evolve_alloc(dim);
gsl_odeiv_system sys = {func_aug,jac_aug,dim,steps};
double t = tStart, t1 = tEnd;
double h = 1e-9;
int ctr = 0;
while(t<t1)
{
int status = gsl_odeiv_evolve_apply(e,c,s,&sys,&t,t1,&h,x0);
if(status != GSL_SUCCESS)
{
printf("\nFailure from evolve!!!!!!!!\n");
break;
}
ctr++;
}
*steps = ctr-1;
gsl_odeiv_evolve_free(e);
gsl_odeiv_control_free(c);
gsl_odeiv_step_free(s);
return;
}