This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: ODE solver
- From: Brian Gough <bjg at network-theory dot co dot uk>
- To: Ivo Alxneit <ivo dot alxneit at psi dot ch>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Fri, 29 Oct 2004 16:33:33 +0100
- Subject: Re: ODE solver
- References: <200410271201.49804.ivo.alxneit@psi.ch>
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