From 2e8332522efa2d6886a8d7d5ea213cedcfb03d9e Mon Sep 17 00:00:00 2001 From: Luc Maisonobe Date: Fri, 26 Oct 2007 15:06:35 +0000 Subject: [PATCH] improved test coverage git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@588677 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/math/ode/DormandPrince54IntegratorTest.java | 8 ++++---- .../commons/math/ode/DormandPrince853IntegratorTest.java | 8 ++++---- .../math/ode/GraggBulirschStoerIntegratorTest.java | 6 +++--- .../commons/math/ode/HighamHall54IntegratorTest.java | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/test/org/apache/commons/math/ode/DormandPrince54IntegratorTest.java b/src/test/org/apache/commons/math/ode/DormandPrince54IntegratorTest.java index 063395fc3..bceaf9ee3 100644 --- a/src/test/org/apache/commons/math/ode/DormandPrince54IntegratorTest.java +++ b/src/test/org/apache/commons/math/ode/DormandPrince54IntegratorTest.java @@ -57,12 +57,12 @@ public class DormandPrince54IntegratorTest TestProblem1 pb = new TestProblem1(); double minStep = 0.1 * (pb.getFinalTime() - pb.getInitialTime()); double maxStep = pb.getFinalTime() - pb.getInitialTime(); - double scalAbsoluteTolerance = 1.0e-15; - double scalRelativeTolerance = 1.0e-15; + double[] vecAbsoluteTolerance = { 1.0e-15, 1.0e-16 }; + double[] vecRelativeTolerance = { 1.0e-15, 1.0e-16 }; FirstOrderIntegrator integ = new DormandPrince54Integrator(minStep, maxStep, - scalAbsoluteTolerance, - scalRelativeTolerance); + vecAbsoluteTolerance, + vecRelativeTolerance); TestProblemHandler handler = new TestProblemHandler(pb); integ.setStepHandler(handler); integ.integrate(pb, diff --git a/src/test/org/apache/commons/math/ode/DormandPrince853IntegratorTest.java b/src/test/org/apache/commons/math/ode/DormandPrince853IntegratorTest.java index ff26ca008..7902e09bf 100644 --- a/src/test/org/apache/commons/math/ode/DormandPrince853IntegratorTest.java +++ b/src/test/org/apache/commons/math/ode/DormandPrince853IntegratorTest.java @@ -72,12 +72,12 @@ public class DormandPrince853IntegratorTest TestProblem1 pb = new TestProblem1(); double minStep = 0.1 * (pb.getFinalTime() - pb.getInitialTime()); double maxStep = pb.getFinalTime() - pb.getInitialTime(); - double scalAbsoluteTolerance = 1.0e-15; - double scalRelativeTolerance = 1.0e-15; + double[] vecAbsoluteTolerance = { 1.0e-15, 1.0e-16 }; + double[] vecRelativeTolerance = { 1.0e-15, 1.0e-16 }; FirstOrderIntegrator integ = new DormandPrince853Integrator(minStep, maxStep, - scalAbsoluteTolerance, - scalRelativeTolerance); + vecAbsoluteTolerance, + vecRelativeTolerance); TestProblemHandler handler = new TestProblemHandler(pb); integ.setStepHandler(handler); integ.integrate(pb, diff --git a/src/test/org/apache/commons/math/ode/GraggBulirschStoerIntegratorTest.java b/src/test/org/apache/commons/math/ode/GraggBulirschStoerIntegratorTest.java index 34f1c91eb..56fb5eb7e 100644 --- a/src/test/org/apache/commons/math/ode/GraggBulirschStoerIntegratorTest.java +++ b/src/test/org/apache/commons/math/ode/GraggBulirschStoerIntegratorTest.java @@ -71,12 +71,12 @@ public class GraggBulirschStoerIntegratorTest TestProblem1 pb = new TestProblem1(); double minStep = 0.1 * (pb.getFinalTime() - pb.getInitialTime()); double maxStep = pb.getFinalTime() - pb.getInitialTime(); - double absTolerance = 1.0e-20; - double relTolerance = 1.0e-20; + double[] vecAbsoluteTolerance = { 1.0e-20, 1.0e-21 }; + double[] vecRelativeTolerance = { 1.0e-20, 1.0e-21 }; FirstOrderIntegrator integ = new GraggBulirschStoerIntegrator(minStep, maxStep, - absTolerance, relTolerance); + vecAbsoluteTolerance, vecRelativeTolerance); TestProblemHandler handler = new TestProblemHandler(pb); integ.setStepHandler(handler); integ.integrate(pb, diff --git a/src/test/org/apache/commons/math/ode/HighamHall54IntegratorTest.java b/src/test/org/apache/commons/math/ode/HighamHall54IntegratorTest.java index f54df0911..6e07ee539 100644 --- a/src/test/org/apache/commons/math/ode/HighamHall54IntegratorTest.java +++ b/src/test/org/apache/commons/math/ode/HighamHall54IntegratorTest.java @@ -79,12 +79,12 @@ public class HighamHall54IntegratorTest TestProblem1 pb = new TestProblem1(); double minStep = 0.1 * (pb.getFinalTime() - pb.getInitialTime()); double maxStep = pb.getFinalTime() - pb.getInitialTime(); - double scalAbsoluteTolerance = 1.0e-15; - double scalRelativeTolerance = 1.0e-15; + double[] vecAbsoluteTolerance = { 1.0e-15, 1.0e-16 }; + double[] vecRelativeTolerance = { 1.0e-15, 1.0e-16 }; FirstOrderIntegrator integ = new HighamHall54Integrator(minStep, maxStep, - scalAbsoluteTolerance, - scalRelativeTolerance); + vecAbsoluteTolerance, + vecRelativeTolerance); TestProblemHandler handler = new TestProblemHandler(pb); integ.setStepHandler(handler); integ.integrate(pb,