You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Luc Maisonobe (JIRA)" <ji...@apache.org> on 2011/06/22 16:14:47 UTC

[jira] [Commented] (MATH-596) GraggBulirschStoerIntegrator output too low

    [ https://issues.apache.org/jira/browse/MATH-596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053278#comment-13053278 ] 

Luc Maisonobe commented on MATH-596:
------------------------------------

It seems to me the problem is related to the interpolator the integrator sends to the step handler.
If I change the implementation of requiresDenseOutput to return true instead of false in the step handle, the error becomes about 9e-16.

Could you check this change completely solves the problem for you.

This requiresDenseOutput was added long ago (even before this code was included in Apache Commons Math) as an optimization to avoid calling computeDerivatives too many times for some integrators. In fact, only Dormand-Prince 8 (5,3) needs it because if the interpolator is not used, we can save 3 calls per step.

Now I think this feature brings more problems than it solves:
 - it forces users to implement this method despite its purpose is not clear,
 - obviously it creates problems with at least Gragg-Bulirsch-Stoer since this
   integrator really needs interpolation
 - it will create the same problems for Adams integrators (they also need interpolation)
 - this "optimization" is useful only for one integrator
 - in many cases, even for this integrator it does not optimize anything since
   people will need interpolation

So I would like to completely remove this.
I'm switching to the developers mailing list to discuss about it. It is a better place for discussion than
this JIRA issue. Please join the discussion here, and we will post the conclusion to complete this report.

> GraggBulirschStoerIntegrator output too low
> -------------------------------------------
>
>                 Key: MATH-596
>                 URL: https://issues.apache.org/jira/browse/MATH-596
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Dennis Hendriks
>         Attachments: MyTest.java
>
>
> I have the following problem:
> x(3.0) = 4.0
> x' = 3.0
> t0 = 3.0
> tend = 10.0
> ODE solving using the GraggBulirschStoerIntegrator(1e-10, 100.0, 1e-7, 1e-7) integrator, gives me:
> t, x, x'
> 3.0, 4.0, 3.0
> 3.105840007284127, 4.0, 3.0
> 3.829973288493221, 4.31752002185238, 3.0
> 8.784328663271161, 6.489919865479664, 3.0
> 10.0, 21.35298598981348, 3.0
> Clearly, the value of x at time 3.10... should be something like 4.30... and not 4.0. Also, the value of x at time 10.0 should be around 25.0 and not be 21.35...
> If we switch to the DormandPrince853Integrator(1e-10, 100.0, 1e-7, 1e-7), it gives me:
> 3.0, 4.0, 3.0
> 3.079933916721644, 4.239801750164932, 3.0
> 3.8792730839380845, 6.637819251814253, 3.0
> 10.0, 24.999999999999996, 3.0
> as expected.
> This seems to me like the GraggBulirschStoerIntegrator has a bug...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira