You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2016/01/06 14:50:39 UTC

[23/50] [abbrv] [math] Fixed Dormand-Prince 5(4) field integrator constants.

Fixed Dormand-Prince 5(4) field integrator constants.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/53af1473
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/53af1473
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/53af1473

Branch: refs/heads/master
Commit: 53af14730cd52af888a37c35c326d735f54c76c3
Parents: f3cdf56
Author: Luc Maisonobe <lu...@apache.org>
Authored: Wed Jan 6 12:41:36 2016 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Wed Jan 6 12:41:36 2016 +0100

----------------------------------------------------------------------
 .../ode/nonstiff/DormandPrince54FieldIntegrator.java      |  4 ++--
 .../ode/nonstiff/DormandPrince54FieldIntegratorTest.java  | 10 +++++-----
 .../DormandPrince54FieldStepInterpolatorTest.java         |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/53af1473/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegrator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegrator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegrator.java
index 743dbe4..e454ca7 100644
--- a/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegrator.java
+++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegrator.java
@@ -134,7 +134,7 @@ public class DormandPrince54FieldIntegrator<T extends RealFieldElement<T>>
         final T[] c = MathArrays.buildArray(getField(), 6);
         c[0] = fraction(1,  5);
         c[1] = fraction(3, 10);
-        c[2] = fraction(5,  5);
+        c[2] = fraction(4,  5);
         c[3] = fraction(8,  9);
         c[4] = getField().getOne();
         c[5] = getField().getOne();
@@ -149,7 +149,7 @@ public class DormandPrince54FieldIntegrator<T extends RealFieldElement<T>>
             a[i] = MathArrays.buildArray(getField(), i + 1);
         }
         a[0][0] = fraction(     1,     5);
-        a[1][0] = fraction(     3,     4);
+        a[1][0] = fraction(     3,    40);
         a[1][1] = fraction(     9,    40);
         a[2][0] = fraction(    44,    45);
         a[2][1] = fraction(   -56,    15);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/53af1473/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegratorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegratorTest.java
index 4015ffe..9a853cd 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegratorTest.java
@@ -49,12 +49,12 @@ public class DormandPrince54FieldIntegratorTest extends AbstractEmbeddedRungeKut
 
     @Test
     public void testBackward() {
-        doTestBackward(Decimal64Field.getInstance(), 2.0e-7, 2.0e-7, 1.0e-12, "Dormand-Prince 5(4)");
+        doTestBackward(Decimal64Field.getInstance(), 1.6e-7, 1.6e-7, 1.0e-22, "Dormand-Prince 5(4)");
     }
 
     @Test
     public void testKepler() {
-        doTestKepler(Decimal64Field.getInstance(), 7.0e-10);
+        doTestKepler(Decimal64Field.getInstance(), 3.1e-10);
     }
 
     @Override
@@ -69,15 +69,15 @@ public class DormandPrince54FieldIntegratorTest extends AbstractEmbeddedRungeKut
 
     @Override
     public void testIncreasingTolerance() {
-        // the 0.7 factor is only valid for this test
+        // the 0.5 factor is only valid for this test
         // and has been obtained from trial and error
         // there is no general relation between local and global errors
-        doTestIncreasingTolerance(Decimal64Field.getInstance(), 0.7, 1.0e-12);
+        doTestIncreasingTolerance(Decimal64Field.getInstance(), 0.5, 1.0e-12);
     }
 
     @Override
     public void testEvents() {
-        doTestEvents(Decimal64Field.getInstance(), 5.0e-6, "Dormand-Prince 5(4)");
+        doTestEvents(Decimal64Field.getInstance(), 3.10e-8, "Dormand-Prince 5(4)");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/commons-math/blob/53af1473/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java
index 9facccd..2aeac54 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java
@@ -38,12 +38,12 @@ public class DormandPrince54FieldStepInterpolatorTest extends AbstractRungeKutta
 
     @Test
     public void interpolationInside() {
-        doInterpolationInside(Decimal64Field.getInstance(), 4.0e-13, 2.7e-15);
+        doInterpolationInside(Decimal64Field.getInstance(), 9.5e-14, 1.8e-15);
     }
 
     @Test
     public void nonFieldInterpolatorConsistency() {
-        doNonFieldInterpolatorConsistency(Decimal64Field.getInstance(), 4.2e-17, 2.3e-16, 6.7e-16, 8.4e-17);
+        doNonFieldInterpolatorConsistency(Decimal64Field.getInstance(), 2.8e-17, 2.3e-16, 4.5e-16, 5.6e-17);
     }
 
 }