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.jupiter.api.Test;
21
22
23 class DormandPrince853IntegratorTest extends EmbeddedRungeKuttaIntegratorAbstractTest {
24
25 protected EmbeddedRungeKuttaIntegrator
26 createIntegrator(final double minStep, final double maxStep,
27 final double scalAbsoluteTolerance, final double scalRelativeTolerance) {
28 return new DormandPrince853Integrator(minStep, maxStep, scalAbsoluteTolerance, scalRelativeTolerance);
29 }
30
31 protected EmbeddedRungeKuttaIntegrator
32 createIntegrator(final double minStep, final double maxStep,
33 final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance) {
34 return new DormandPrince853Integrator(minStep, maxStep, vecAbsoluteTolerance, vecRelativeTolerance);
35 }
36
37 @Override
38 @Test
39 public void testBackward() {
40 doTestBackward(8.1e-8, 1.1e-7, 1.0e-12, "Dormand-Prince 8 (5, 3)");
41 }
42
43 @Override
44 @Test
45 public void testKepler() {
46 doTestKepler(4.4e-11);
47 }
48
49 @Override
50 @Test
51 public void testTorqueFreeMotionOmegaOnly() {
52 doTestTorqueFreeMotionOmegaOnly(4.0e-16);
53 }
54
55 @Override
56 @Test
57 public void testTorqueFreeMotion() {
58 doTestTorqueFreeMotion(1.3e-12, 9.0e-12);
59 }
60
61 @Override
62 @Test
63 public void testTorqueFreeMotionIssue230() {
64 doTestTorqueFreeMotionIssue230(2.9e-14, 7.8e-14);
65 }
66
67 @Override
68 @Test
69 public void testForwardBackwardExceptions() {
70 doTestForwardBackwardExceptions();
71 }
72
73 @Override
74 @Test
75 public void testIncreasingTolerance() {
76
77
78
79 doTestIncreasingTolerance(1.3, 1.0e-12);
80 }
81
82 @Override
83 @Test
84 public void testEvents() {
85 doTestEvents(2.1e-7, "Dormand-Prince 8 (5, 3)");
86 }
87
88 @Override
89 @Test
90 public void testStepEnd() {
91 doTestStepEnd(20, "Dormand-Prince 8 (5, 3)");
92 }
93
94 @Override
95 @Test
96 public void testStopAfterStep() {
97 doTestStopAfterStep(12, 6.842171);
98 }
99
100 @Override
101 @Test
102 public void testResetAfterStep() {
103 doTestResetAfterStep(12, 13);
104 }
105
106 @Test
107 public void testMissedEndEvent() {
108 doTestMissedEndEvent(1.0e-15, 1.0e-15);
109 }
110
111 @Test
112 public void testVariableSteps() {
113 doTestVariableSteps(0.00763, 0.836);
114 }
115
116 @Test
117 public void testUnstableDerivative() {
118 doTestUnstableDerivative(1.0e-12);
119 }
120
121 @Override
122 @Test
123 public void testPartialDerivatives() {
124 doTestPartialDerivatives(2.6e-12, 2.0e-11);
125 }
126
127 @Test
128 public void testSecondaryEquations() {
129 doTestSecondaryEquations(3.3e-12, 8.9e-15);
130 }
131
132 }