updated tests threshold as events are now forced on some root sides

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1144892 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2011-07-10 16:08:50 +00:00
parent ddd7f07939
commit 4b299469ed
2 changed files with 3 additions and 4 deletions

View File

@ -230,15 +230,14 @@ public class DormandPrince853IntegratorTest {
EventHandler[] functions = pb.getEventsHandlers();
double convergence = 1.0e-8 * maxStep;
for (int l = 0; l < functions.length; ++l) {
integ.addEventHandler(functions[l],
Double.POSITIVE_INFINITY, convergence, 1000);
integ.addEventHandler(functions[l], Double.POSITIVE_INFINITY, convergence, 1000);
}
Assert.assertEquals(functions.length, integ.getEventHandlers().size());
integ.integrate(pb,
pb.getInitialTime(), pb.getInitialState(),
pb.getFinalTime(), new double[pb.getDimension()]);
Assert.assertEquals(0, handler.getMaximalValueError(), 1.1e-7);
Assert.assertEquals(0, handler.getMaximalValueError(), 2.1e-7);
Assert.assertEquals(0, handler.getMaximalTimeError(), convergence);
Assert.assertEquals(12.0, handler.getLastTime(), convergence);
integ.clearEventHandlers();

View File

@ -223,7 +223,7 @@ public class GraggBulirschStoerIntegratorTest {
pb.getInitialTime(), pb.getInitialState(),
pb.getFinalTime(), new double[pb.getDimension()]);
Assert.assertTrue(handler.getMaximalValueError() < 5.0e-8);
Assert.assertTrue(handler.getMaximalValueError() < 4.0e-7);
Assert.assertEquals(0, handler.getMaximalTimeError(), convergence);
Assert.assertEquals(12.0, handler.getLastTime(), convergence);
integ.clearEventHandlers();