1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.hipparchus.ode.nonstiff;
19
20
21 import org.hipparchus.CalculusFieldElement;
22 import org.hipparchus.Field;
23 import org.hipparchus.util.Binary64Field;
24 import org.junit.Test;
25
26 public class DormandPrince853FieldIntegratorTest extends EmbeddedRungeKuttaFieldIntegratorAbstractTest {
27
28 protected <T extends CalculusFieldElement<T>> EmbeddedRungeKuttaFieldIntegrator<T>
29 createIntegrator(Field<T> field, final double minStep, final double maxStep,
30 final double scalAbsoluteTolerance, final double scalRelativeTolerance) {
31 return new DormandPrince853FieldIntegrator<T>(field, minStep, maxStep, scalAbsoluteTolerance, scalRelativeTolerance);
32 }
33
34 protected <T extends CalculusFieldElement<T>> EmbeddedRungeKuttaFieldIntegrator<T>
35 createIntegrator(Field<T> field, final double minStep, final double maxStep,
36 final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance) {
37 return new DormandPrince853FieldIntegrator<T>(field, minStep, maxStep, vecAbsoluteTolerance, vecRelativeTolerance);
38 }
39
40 @Override
41 public void testNonFieldIntegratorConsistency() {
42 doTestNonFieldIntegratorConsistency(Binary64Field.getInstance());
43 }
44
45 @Override
46 public void testSanityChecks() {
47 doTestSanityChecks(Binary64Field.getInstance());
48 }
49
50 @Override
51 public void testBackward() {
52 doTestBackward(Binary64Field.getInstance(), 8.1e-8, 1.1e-7, 1.0e-12, "Dormand-Prince 8 (5, 3)");
53 }
54
55 @Override
56 public void testKepler() {
57 doTestKepler(Binary64Field.getInstance(), 4.4e-11);
58 }
59
60 @Override
61 public void testTorqueFreeMotionOmegaOnly() {
62 doTestTorqueFreeMotionOmegaOnly(Binary64Field.getInstance(), 4.0e-16);
63 }
64
65 @Override
66 public void testTorqueFreeMotion() {
67 doTestTorqueFreeMotion(Binary64Field.getInstance(), 1.3e-12, 9.0e-12);
68 }
69
70 @Override
71 public void testTorqueFreeMotionIssue230() {
72 doTestTorqueFreeMotionIssue230(Binary64Field.getInstance(), 2.9e-14, 7.8e-14);
73 }
74
75 @Override
76 public void testForwardBackwardExceptions() {
77 doTestForwardBackwardExceptions(Binary64Field.getInstance());
78 }
79
80 @Override
81 public void testMinStep() {
82 doTestMinStep(Binary64Field.getInstance());
83 }
84
85 @Override
86 public void testIncreasingTolerance() {
87
88
89
90 doTestIncreasingTolerance(Binary64Field.getInstance(), 1.3, 1.0e-12);
91 }
92
93 @Override
94 public void testEvents() {
95 doTestEvents(Binary64Field.getInstance(), 2.1e-7, "Dormand-Prince 8 (5, 3)");
96 }
97
98 @Override
99 public void testStepEnd() {
100 doTestStepEnd(Binary64Field.getInstance(), 20, "Dormand-Prince 8 (5, 3)");
101 }
102
103 @Override
104 public void testStopAfterStep() {
105 doTestStopAfterStep(Binary64Field.getInstance(), 12, 6.842171);
106 }
107
108 @Override
109 public void testResetAfterStep() {
110 doTestResetAfterStep(Binary64Field.getInstance(), 12, 13);
111 }
112
113 @Override
114 public void testEventsErrors() {
115 doTestEventsErrors(Binary64Field.getInstance());
116 }
117
118 @Override
119 public void testEventsNoConvergence() {
120 doTestEventsNoConvergence(Binary64Field.getInstance());
121 }
122
123 @Override
124 public void testPartialDerivatives() {
125 doTestPartialDerivatives(2.6e-12, new double[] { 5.9e-11, 3.6e-12, 5.3e-12, 5.3e-12, 3.6e-12 });
126 }
127
128 @Test
129 public void testSecondaryEquations() {
130 doTestSecondaryEquations(Binary64Field.getInstance(), 3.3e-12, 8.9e-15);
131 }
132
133 }