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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 29 October 2004 05:33 pm, you wrote:
> 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.

aahhh yes (silly me)

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

so you mean

gsl_odeiv_system sys_without = {func2, NULL, 2, &mu2};

in my code?
in this case i get the expected segfault. (question: shouldn't 
gsl_odeiv_evolve_apply and related functions return an error and abort 
gracefully?).
i assume that i was correct on that only bsimp uses the jacobian 
matrix/function (maybe state in the manual that only algorithms where it is 
explicity mentionned make use of the jacobian).

anyway thanks 

- -- 
Dr. Ivo Alxneit
Laboratory for Solar Technology   phone: +41 56 310 4092
CH-5232 Villigen                    fax: +41 56 310 2624
Paul Scherrer Institute          http://solar.web.psi.ch
Switzerland                        gnupg key: 0x515E30C7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBhMWDAd7CE1FeMMcRAmtYAJ0ej39pWE3/IEZTvvHaiYzcOxkt+gCgq03x
WY41I8RRfznlbUFTsQtU6qk=
=beyA
-----END PGP SIGNATURE-----


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