Author: luc
Date: Tue Dec 22 19:30:10 2009
New Revision: 893281
URL: http://svn.apache.org/viewvc?rev=893281&view=rev
Log:
Fixed a convergence discrepancy with respect to theory in Gragg-Bulirsch-Stoer
integrator.
JIRA: MATH-324
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java
commons/proper/math/trunk/src/site/xdoc/changes.xml
commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java
URL:
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java?rev=893281&r1=893280&r2=893281&view=diff
==============================================================================
---
commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java
(original)
+++
commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java
Tue Dec 22 19:30:10 2009
@@ -746,7 +746,7 @@
// estimate if there is a chance convergence will
// be reached on next iteration, using the
// asymptotic evolution of error
- final double ratio = ((double) sequence [k] *
sequence[k+1]) /
+ final double ratio = ((double) sequence [targetIter] *
sequence[targetIter + 1]) /
(sequence[0] * sequence[0]);
if (error > ratio * ratio) {
// we don't expect to converge on next iteration
Modified: commons/proper/math/trunk/src/site/xdoc/changes.xml
URL:
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/xdoc/changes.xml?rev=893281&r1=893280&r2=893281&view=diff
==============================================================================
--- commons/proper/math/trunk/src/site/xdoc/changes.xml (original)
+++ commons/proper/math/trunk/src/site/xdoc/changes.xml Tue Dec 22 19:30:10 2009
@@ -39,6 +39,10 @@
</properties>
<body>
<release version="2.1" date="TBD" description="TBD">
+ <action dev="luc" type="fix" issue="MATH-324" due-to="Vincent Morand">
+ Fixed a convergence discrepancy with respect to theory in
Gragg-Bulirsch-Stoer
+ integrator.
+ </action>
<action dev="luc" type="fix" due-to="Dimitri Pourbaix">
Fixed a wrong dimension check in SVD solver.
</action>
Modified:
commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java
URL:
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java?rev=893281&r1=893280&r2=893281&view=diff
==============================================================================
---
commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java
(original)
+++
commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java
Tue Dec 22 19:30:10 2009
@@ -78,8 +78,8 @@
oos.writeObject(handler);
}
- assertTrue(bos.size () > 34000);
- assertTrue(bos.size () < 35000);
+ assertTrue(bos.size () > 33000);
+ assertTrue(bos.size () < 34000);
ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
ObjectInputStream ois = new ObjectInputStream(bis);
@@ -101,7 +101,7 @@
}
}
- assertTrue(maxError < 5.0e-11);
+ assertTrue(maxError < 5.0e-10);
}