Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-322

during ODE integration, the last event in a pair of very close event may not be detected



    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.1
    • None
    • None
    • All


      When an events follows a previous one very closely, it may be ignored. The occurrence of the bug depends on the side of the bracketing interval that was selected. For example consider a switching function that is increasing around first event around t = 90, reaches its maximum and is decreasing around the second event around t = 135. If an integration step spans from 67.5 and 112.5, the switching function values at start and end of step will have opposite signs, so the first event will be detected. The solver will find the event really occurs at 90.0 and will therefore truncate the step at 90.0. The next step will start from where the first step ends, i.e. it will start at 90.0. Let's say this step spans from 90.0 to 153.0. The switching function switches once again in this step.

      If the solver for the first event converged to a value slightly before 90.0 (say 89.9999999), then the switch will not be detected because g(89.9999999) and g(153.0) are both negative.

      This bug was introduced as of r781157 (2009-06-02) when special handling of events very close to step start was added.




            luc Luc Maisonobe
            luc Luc Maisonobe
            0 Vote for this issue
            0 Start watching this issue