[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] ode version and compilers
From: |
Rhys Ulerich |
Subject: |
Re: [Help-gsl] ode version and compilers |
Date: |
Wed, 6 Nov 2013 09:25:10 -0600 |
> For simplicity, I would like to call the following segment an iteration.
>
> while (t < t1)
> {
> int status = gsl_odeiv2_evolve_apply (e, c, s, &sys, &t, t1, &h, y);
>
> if (status != GSL_SUCCESS)
> break;
> }
>
> ...
>
> Honestly, I started to worry whether modifying things in params outside
> iterations is a misuse of GSL.
This may be a use case for which 4771 introduces a bug. Hear me out...
When using a plain-vanilla RK4 scheme, the system of equations and all
of its parameters must remain fixed from substep-to-substep for
full-order accuracy to be achieved. However, between RK4 steps one is
permitted to change the parameters however one likes.
Along that line of reasoning, I would expect
gsl_odeiv2_evolve_apply (e, c, s, &sys, &t, t+1, &h, y);
// modify system parameters in some fashion
gsl_odeiv2_evolve_apply (e, c, s, &sys, &t, t+1, &h, y);
to behave identically pre- and post-4771 as line 1 completes some
number of full steps of the chosen scheme. That is, the modification
in line 2 is not done in between substeps.
Alan, am I interpreting your use case correctly?
Tuomo, is this use case supported and, if so, does 4771 break it in
some fashion?
- Rhys