Willi,

> int
> func (double t, const double y[], double f[], struct par *pz)
> {
>
>  double mu=pz->mu;
>  double om=pz->om;
>  double de=pz->de;
>  //printf ("%.5e %.5e %.5e\n", pz->mu, pz->om, pz->de);
>
>  f[0] = om*y[1];
>  f[1] = -y[0] - mu*y[1]*(y[0]*y[0] - 1);
>  f[2] = de*y[1]*y[2];
>
>  return GSL_SUCCESS;
> }

Change the function call signature to take a void pointer, then use a cast:

int func (double t, const double y[], double f[], void *p) {
  struct par *pz = (struct par*) p;  // cast p as a pointer to struct
par, assign to pz
  ...
}

This should do the trick.  You will need to do the same for the
function jac as well.

Cheers,
~Luke

_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to