commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r787052 - in /commons/proper/math/trunk/src: java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java test/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java
Date Sun, 21 Jun 2009 17:07:28 GMT
Author: luc
Date: Sun Jun 21 17:07:27 2009
New Revision: 787052

URL: http://svn.apache.org/viewvc?rev=787052&view=rev
Log:
fixed Adams-Bashforth order for error control (it is k, not k+1)

Modified:
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java?rev=787052&r1=787051&r2=787052&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java
Sun Jun 21 17:07:27 2009
@@ -157,7 +157,7 @@
                                     final double scalAbsoluteTolerance,
                                     final double scalRelativeTolerance)
         throws IllegalArgumentException {
-        super("Adams-Bashforth", nSteps, nSteps + 1, minStep, maxStep,
+        super("Adams-Bashforth", nSteps, nSteps, minStep, maxStep,
               scalAbsoluteTolerance, scalRelativeTolerance);
     }
 
@@ -177,7 +177,7 @@
                                     final double[] vecAbsoluteTolerance,
                                     final double[] vecRelativeTolerance)
         throws IllegalArgumentException {
-        super("Adams-Bashforth", nSteps, nSteps + 1, minStep, maxStep,
+        super("Adams-Bashforth", nSteps, nSteps, minStep, maxStep,
               vecAbsoluteTolerance, vecRelativeTolerance);
     }
 

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java?rev=787052&r1=787051&r2=787052&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java
Sun Jun 21 17:07:27 2009
@@ -78,11 +78,11 @@
                             pb.getInitialTime(), pb.getInitialState(),
                             pb.getFinalTime(), new double[pb.getDimension()]);
 
-            // the 28 and 42 factors are only valid for this test
+            // the 33 and 45 factors are only valid for this test
             // and has been obtained from trial and error
             // there is no general relation between local and global errors
-            assertTrue(handler.getMaximalValueError() > (28.0 * scalAbsoluteTolerance));
-            assertTrue(handler.getMaximalValueError() < (42.0 * scalAbsoluteTolerance));
+            assertTrue(handler.getMaximalValueError() > (33.0 * scalAbsoluteTolerance));
+            assertTrue(handler.getMaximalValueError() < (45.0 * scalAbsoluteTolerance));
             assertEquals(0, handler.getMaximalTimeError(), 1.0e-16);
 
             int calls = pb.getCalls();



Mime
View raw message