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 ThreeEighthesFieldIntegratorTest extends RungeKuttaFieldIntegratorAbstractTest {
27
28 protected <T extends CalculusFieldElement<T>> RungeKuttaFieldIntegrator<T>
29 createIntegrator(Field<T> field, T step) {
30 return new ThreeEighthesFieldIntegrator<T>(field, step);
31 }
32
33 @Override
34 public void testNonFieldIntegratorConsistency() {
35 doTestNonFieldIntegratorConsistency(Binary64Field.getInstance());
36 }
37
38 @Override
39 public void testMissedEndEvent() {
40 doTestMissedEndEvent(Binary64Field.getInstance(), 1.0e-15, 6.0e-5);
41 }
42
43 @Override
44 public void testSanityChecks() {
45 doTestSanityChecks(Binary64Field.getInstance());
46 }
47
48 @Override
49 public void testDecreasingSteps() {
50 doTestDecreasingSteps(Binary64Field.getInstance(), 1.0, 1.0, 1.0e-10);
51 }
52
53 @Override
54 public void testSmallStep() {
55 doTestSmallStep(Binary64Field.getInstance(), 2.0e-13, 4.0e-12, 1.0e-12, "3/8");
56 }
57
58 @Override
59 public void testBigStep() {
60 doTestBigStep(Binary64Field.getInstance(), 0.0004, 0.005, 1.0e-12, "3/8");
61
62 }
63
64 @Override
65 public void testBackward() {
66 doTestBackward(Binary64Field.getInstance(), 5.0e-10, 7.0e-10, 1.0e-12, "3/8");
67 }
68
69 @Override
70 public void testKepler() {
71 doTestKepler(Binary64Field.getInstance(), 0.0348, 1.0e-4);
72 }
73
74 @Override
75 public void testStepSize() {
76 doTestStepSize(Binary64Field.getInstance(), 1.0e-12);
77 }
78
79 @Override
80 public void testSingleStep() {
81 doTestSingleStep(Binary64Field.getInstance(), 0.21);
82 }
83
84 @Override
85 public void testTooLargeFirstStep() {
86 doTestTooLargeFirstStep(Binary64Field.getInstance());
87 }
88
89 @Override
90 public void testUnstableDerivative() {
91 doTestUnstableDerivative(Binary64Field.getInstance(), 1.0e-12);
92 }
93
94 @Override
95 public void testDerivativesConsistency() {
96 doTestDerivativesConsistency(Binary64Field.getInstance(), 1.0e-10);
97 }
98
99 @Override
100 public void testPartialDerivatives() {
101 doTestPartialDerivatives(3.2e-10, new double[] { 2.1e-9, 5.9e-10, 7.0e-11, 5.9e-10, 5.9e-10 });
102 }
103
104 @Test
105 public void testSecondaryEquations() {
106 doTestSecondaryEquations(Binary64Field.getInstance(), 1.1e-12, 5.6e-13);
107 }
108
109 }