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.exception.MathIllegalArgumentException;
24 import org.hipparchus.exception.MathIllegalStateException;
25 import org.hipparchus.util.Binary64Field;
26 import org.junit.Test;
27
28 public class LutherFieldIntegratorTest extends RungeKuttaFieldIntegratorAbstractTest {
29
30 protected <T extends CalculusFieldElement<T>> RungeKuttaFieldIntegrator<T>
31 createIntegrator(Field<T> field, T step) {
32 return new LutherFieldIntegrator<T>(field, step);
33 }
34
35 @Override
36 public void testNonFieldIntegratorConsistency() {
37 doTestNonFieldIntegratorConsistency(Binary64Field.getInstance());
38 }
39
40 @Override
41 public void testMissedEndEvent()
42 throws MathIllegalArgumentException, MathIllegalStateException {
43 doTestMissedEndEvent(Binary64Field.getInstance(), 1.0e-15, 1.0e-15);
44 }
45
46 @Override
47 public void testSanityChecks()
48 throws MathIllegalArgumentException, MathIllegalStateException {
49 doTestSanityChecks(Binary64Field.getInstance());
50 }
51
52 @Override
53 public void testDecreasingSteps()
54 throws MathIllegalArgumentException, MathIllegalStateException {
55 doTestDecreasingSteps(Binary64Field.getInstance(), 3.6, 1.0, 1.0e-10);
56 }
57
58 @Override
59 public void testSmallStep()
60 throws MathIllegalArgumentException, MathIllegalStateException {
61 doTestSmallStep(Binary64Field.getInstance(), 8.7e-17, 3.6e-15, 1.0e-12, "Luther");
62 }
63
64 @Override
65 public void testBigStep()
66 throws MathIllegalArgumentException, MathIllegalStateException {
67 doTestBigStep(Binary64Field.getInstance(), 2.7e-5, 1.7e-3, 1.0e-12, "Luther");
68 }
69
70 @Override
71 public void testBackward()
72 throws MathIllegalArgumentException, MathIllegalStateException {
73 doTestBackward(Binary64Field.getInstance(), 2.4e-13, 4.3e-13, 1.0e-12, "Luther");
74 }
75
76 @Override
77 public void testKepler()
78 throws MathIllegalArgumentException, MathIllegalStateException {
79 doTestKepler(Binary64Field.getInstance(), 2.18e-7, 4.0e-10);
80 }
81
82 @Override
83 public void testStepSize()
84 throws MathIllegalArgumentException, MathIllegalStateException {
85 doTestStepSize(Binary64Field.getInstance(), 1.0e-22);
86 }
87
88 @Override
89 public void testSingleStep() {
90 doTestSingleStep(Binary64Field.getInstance(), 6.0e-12);
91 }
92
93 @Override
94 public void testTooLargeFirstStep() {
95 doTestTooLargeFirstStep(Binary64Field.getInstance());
96 }
97
98 @Override
99 public void testUnstableDerivative() {
100 doTestUnstableDerivative(Binary64Field.getInstance(), 4.0e-15);
101 }
102
103 @Override
104 public void testDerivativesConsistency() {
105 doTestDerivativesConsistency(Binary64Field.getInstance(), 1.0e-20);
106 }
107
108 @Override
109 public void testPartialDerivatives() {
110 doTestPartialDerivatives(4.4e-13, new double[] { 2.3e-12, 5.6e-13, 9.5e-14, 9.5e-14, 5.6e-13 });
111 }
112
113 @Test
114 public void testSecondaryEquations() {
115 doTestSecondaryEquations(Binary64Field.getInstance(), 1.0e-12, 5.6e-13);
116 }
117
118 }