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 import org.junit.Test;
21
22 public class DormandPrince54IntegratorTest extends EmbeddedRungeKuttaIntegratorAbstractTest {
23
24 protected EmbeddedRungeKuttaIntegrator
25 createIntegrator(final double minStep, final double maxStep,
26 final double scalAbsoluteTolerance, final double scalRelativeTolerance) {
27 return new DormandPrince54Integrator(minStep, maxStep, scalAbsoluteTolerance, scalRelativeTolerance);
28 }
29
30 protected EmbeddedRungeKuttaIntegrator
31 createIntegrator(final double minStep, final double maxStep,
32 final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance) {
33 return new DormandPrince54Integrator(minStep, maxStep, vecAbsoluteTolerance, vecRelativeTolerance);
34 }
35
36 @Override
37 public void testBackward() {
38 doTestBackward(1.6e-7, 1.6e-7, 1.0e-22, "Dormand-Prince 5 (4)");
39 }
40
41 @Override
42 public void testKepler() {
43 doTestKepler(3.1e-10);
44 }
45
46 @Override
47 public void testTorqueFreeMotionOmegaOnly() {
48 doTestTorqueFreeMotionOmegaOnly(2.1e-16);
49 }
50
51 @Override
52 public void testTorqueFreeMotion() {
53 doTestTorqueFreeMotion(1.5e-15, 5.6e-16);
54 }
55
56 @Override
57 public void testTorqueFreeMotionIssue230() {
58 doTestTorqueFreeMotionIssue230(5.4e-15, 1.5e-15);
59 }
60
61 @Override
62 public void testForwardBackwardExceptions() {
63 doTestForwardBackwardExceptions();
64 }
65
66 @Override
67 public void testIncreasingTolerance() {
68
69
70
71 doTestIncreasingTolerance(0.7, 1.0e-12);
72 }
73
74 @Override
75 public void testEvents() {
76 doTestEvents(1.7e-7, "Dormand-Prince 5 (4)");
77 }
78
79 @Override
80 public void testStepEnd() {
81 doTestStepEnd(119, "Dormand-Prince 5 (4)");
82 }
83
84 @Override
85 public void testStopAfterStep() {
86 doTestStopAfterStep(12, 1.117270);
87 }
88
89 @Override
90 public void testResetAfterStep() {
91 doTestResetAfterStep(12, 14);
92 }
93
94 @Test
95 public void testMissedEndEvent() {
96 doTestMissedEndEvent(1.0e-15, 1.0e-15);
97 }
98
99 @Test
100 public void testVariableSteps() {
101 doTestVariableSteps(0.00216, 0.240);
102 }
103
104 @Test
105 public void testUnstableDerivative() {
106 doTestUnstableDerivative(1.0e-12);
107 }
108
109 @Override
110 public void testPartialDerivatives() {
111 doTestPartialDerivatives(4.8e-12, 3.3e-11);
112 }
113
114 @Test
115 public void testSecondaryEquations() {
116 doTestSecondaryEquations(4.0e-12, 7.2e-15);
117 }
118
119 }
120