Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
2.0
-
None
-
None
-
Linux
Description
End of integration range in ODE solving is handled as an event.
In some cases, numerical accuracy in events detection leads to error in events location.
The following test case shows the end event is not handled properly and an integration that should cover a 60s range in fact covers a 160s range, more than twice the specified range.
public void testMissedEvent() throws IntegratorException, DerivativeException { final double t0 = 1878250320.0000029; final double t = 1878250379.9999986; FirstOrderDifferentialEquations ode = new FirstOrderDifferentialEquations() { public int getDimension() { return 1; } public void computeDerivatives(double t, double[] y, double[] yDot) throws DerivativeException { yDot[0] = y[0] * 1.0e-6; } }; DormandPrince853Integrator integrator = new DormandPrince853Integrator(0.0, 100.0, 1.0e-10, 1.0e-10); double[] y = { 1.0 }; integrator.setInitialStepSize(60.0); double finalT = integrator.integrate(ode, t0, y, t, y); Assert.assertEquals(t, finalT, 1.0e-6); }