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.Field;
22 import org.hipparchus.CalculusFieldElement;
23 import org.hipparchus.ode.FieldEquationsMapper;
24 import org.hipparchus.ode.FieldODEStateAndDerivative;
25 import org.hipparchus.util.Binary64Field;
26 import org.junit.Test;
27
28 public class HighamHall54FieldStateInterpolatorTest extends RungeKuttaFieldStateInterpolatorAbstractTest {
29
30 protected <T extends CalculusFieldElement<T>> RungeKuttaFieldStateInterpolator<T>
31 createInterpolator(Field<T> field, boolean forward, T[][] yDotK,
32 FieldODEStateAndDerivative<T> globalPreviousState,
33 FieldODEStateAndDerivative<T> globalCurrentState,
34 FieldODEStateAndDerivative<T> softPreviousState,
35 FieldODEStateAndDerivative<T> softCurrentState,
36 FieldEquationsMapper<T> mapper) {
37 return new HighamHall54FieldStateInterpolator<T>(field, forward, yDotK,
38 globalPreviousState, globalCurrentState,
39 softPreviousState, softCurrentState,
40 mapper);
41 }
42
43 protected <T extends CalculusFieldElement<T>> FieldButcherArrayProvider<T>
44 createButcherArrayProvider(final Field<T> field) {
45 return new HighamHall54FieldIntegrator<T>(field, 0, 1, 1, 1);
46 }
47
48 @Test
49 public void interpolationAtBounds() {
50 doInterpolationAtBounds(Binary64Field.getInstance(), 4.9e-16);
51 }
52
53 @Test
54 public void interpolationInside() {
55 doInterpolationInside(Binary64Field.getInstance(), 4.0e-13, 2.7e-15);
56 }
57
58 @Test
59 public void nonFieldInterpolatorConsistency() {
60 doNonFieldInterpolatorConsistency(Binary64Field.getInstance(), 1.3e-16, 1.0e-50, 3.6e-15, 2.1e-16);
61 }
62
63 }