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.ode.EquationsMapper;
22 import org.hipparchus.ode.ODEStateAndDerivative;
23 import org.junit.Test;
24
25 public class DormandPrince853StateInterpolatorTest extends RungeKuttaStateInterpolatorAbstractTest {
26
27 @Override
28 protected RungeKuttaStateInterpolator
29 createInterpolator(boolean forward, double[][] yDotK,
30 ODEStateAndDerivative globalPreviousState,
31 ODEStateAndDerivative globalCurrentState,
32 ODEStateAndDerivative softPreviousState,
33 ODEStateAndDerivative softCurrentState,
34 EquationsMapper mapper) {
35 return new DormandPrince853StateInterpolator(forward, yDotK,
36 globalPreviousState, globalCurrentState,
37 softPreviousState, softCurrentState,
38 mapper);
39 }
40
41 @Override
42 protected ButcherArrayProvider createButcherArrayProvider() {
43 return new DormandPrince853Integrator(0.0, 1.0, 1.0e-10, 1.0e-10);
44 }
45
46 @Test
47 public void interpolationAtBounds() {
48 doInterpolationAtBounds(1.0e-15);
49 }
50
51 @Test
52 public void interpolationInside() {
53 doInterpolationInside(3.1e-17, 3.4e-16);
54 }
55
56 @Override
57 public void restrictPrevious() {
58 doRestrictPrevious(1.0e-15, 1.0e-15);
59 }
60
61 @Override
62 public void restrictCurrent() {
63 doRestrictCurrent(1.0e-15, 1.0e-15);
64 }
65
66 @Override
67 public void restrictBothEnds() {
68 doRestrictBothEnds(1.0e-15, 1.0e-15);
69 }
70
71 @Override
72 public void degenerateInterpolation() {
73 doDegenerateInterpolation();
74 }
75
76 }