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 2015/12/09 17:17:23 UTC
[43/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/84b95dc6
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/84b95dc6
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/84b95dc6
Branch: refs/heads/MATH_3_X
Commit: 84b95dc649bf2f817217bdff9c120ab074fd5b50
Parents: b713e4c
Author: Luc Maisonobe <lu...@apache.org>
Authored: Wed Dec 9 11:38:24 2015 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Wed Dec 9 11:38:24 2015 +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/84b95dc6/src/main/java/org/apache/commons/math3/ode/nonstiff/DormandPrince54FieldIntegrator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/ode/nonstiff/DormandPrince54FieldIntegrator.java b/src/main/java/org/apache/commons/math3/ode/nonstiff/DormandPrince54FieldIntegrator.java
index 356c165..cc60c2c 100644
--- a/src/main/java/org/apache/commons/math3/ode/nonstiff/DormandPrince54FieldIntegrator.java
+++ b/src/main/java/org/apache/commons/math3/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/84b95dc6/src/test/java/org/apache/commons/math3/ode/nonstiff/DormandPrince54FieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math3/ode/nonstiff/DormandPrince54FieldIntegratorTest.java b/src/test/java/org/apache/commons/math3/ode/nonstiff/DormandPrince54FieldIntegratorTest.java
index a52e4a5..1a80dd8 100644
--- a/src/test/java/org/apache/commons/math3/ode/nonstiff/DormandPrince54FieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math3/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/84b95dc6/src/test/java/org/apache/commons/math3/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math3/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java b/src/test/java/org/apache/commons/math3/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java
index 378fbc8..a46544a 100644
--- a/src/test/java/org/apache/commons/math3/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math3/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);
}
}