This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ODE solver


Ivo Alxneit writes:
 > int
 > jac_without (double t, const double y[], double *dfdy, double dfdt[],
 >             void *params)
 > {
 >   dfdy = NULL;
 >   dfdt = NULL;
 >   return GSL_SUCCESS;
 > }
 > 
 > is jac_without correctly used?

Subtle error---the variables dfdy and dfdt are local, so get discarded
when the function exits.

What you want to do is set the jacobian function pointer itself to
NULL or put an abort() inside jac_without().

-- 
Brian Gough


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]