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: Jacobian matrix for ODEs


Slaven Peles writes:
 >  I am looking at the example for adaptive step ODE integrators in
 > GSL Reference Manual
 > (http://sources.redhat.com/gsl/ref/gsl-ref_25.html#SEC377) and I am
 > trying to figure out how to read Jacobian matrix elements during
 > the integration. For the fixed step integration array dfdy[4] with
 > elements of the Jacobi matrix is explicitely defined in main
 > function, so accessing its elements is straightforward. I still
 > don't know how to do it when using adaptive stepsize
 > integration. Only solution that I can think of right now is to
 > invoke function jac whenever Jacobian values are needed, but it
 > seems to me like a duplicating the work.

Include a pointer to some memory in the void * system params struct
and have the Jacobian function save a copy of its results there each
time it computes them.

regards
Brian Gough


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