[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Additional outputs when solving an ODE
From: |
Brian Gough |
Subject: |
Re: [Help-gsl] Additional outputs when solving an ODE |
Date: |
Mon, 21 Sep 2009 09:17:59 +0100 |
User-agent: |
Wanderlust/2.14.0 (Africa) Emacs/22.2 Mule/5.0 (SAKAKI) |
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/