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 EulerIntegratorTest extends RungeKuttaIntegratorAbstractTest {
23
24 protected RungeKuttaIntegrator createIntegrator(double step) {
25 return new EulerIntegrator(step);
26 }
27
28 @Override
29 public void testMissedEndEvent() {
30 doTestMissedEndEvent(1.0e-15, 6.0e-5);
31 }
32
33 @Override
34 public void testSanityChecks() {
35 doTestSanityChecks();
36 }
37
38 @Override
39 public void testDecreasingSteps() {
40 doTestDecreasingSteps(1.0, 1.5, 1.0e-10);
41 }
42
43 @Override
44 public void testSmallStep() {
45 doTestSmallStep(2.0e-4, 1.0e-3, 1.0e-12, "Euler");
46 }
47
48 @Override
49 public void testBigStep() {
50 doTestBigStep(0.01, 0.2, 1.0e-12, "Euler");
51
52 }
53
54 @Override
55 public void testBackward() {
56 doTestBackward(0.45, 0.45, 1.0e-12, "Euler");
57 }
58
59 @Override
60 public void testKepler() {
61
62 doTestKepler(881.176, 0.001);
63 }
64
65 @Override
66 public void testStepSize() {
67 doTestStepSize(1.0e-12);
68 }
69
70 @Override
71 public void testSingleStep() {
72 doTestSingleStep(0.21);
73 }
74
75 @Override
76 public void testTooLargeFirstStep() {
77 doTestTooLargeFirstStep();
78 }
79
80 @Override
81 public void testUnstableDerivative() {
82 doTestUnstableDerivative(1.0e-12);
83 }
84
85 @Override
86 public void testDerivativesConsistency() {
87 doTestDerivativesConsistency(1.0e-10);
88 }
89
90 @Override
91 public void testSerialization() {
92 doTestSerialization(597794, 881);
93 }
94
95 @Test
96 public void testSecondaryEquations() {
97 doTestSecondaryEquations(4.8e-3, 5.6e-13);
98 }
99
100 }