At Wed, 16 Sep 2009 12:07:03 -0700, Luke wrote: > Is there a way I could include the calculation of the extra quantities into > the definition of the ode function? I was thinking that maybe the params > pointer could point to a structure which could be used for the system > parameters *AND* to store the quantities in the above list, at each time > step, but I'm not sure how I would do this exactly.
Yes, you can use the params argument for this - I don't have an example, but it would just be a case of adding a pointer to some memory where you can store them. Note that your function will be called several times with different inputs in computing each ODE step, of which only the final one is relevant, so there is an efficiency tradeoff depending on how complicated the extra values you want to compute are. -- Brian Gough GNU Scientific Library - http://www.gnu.org/software/gsl/ _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
