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 ThreeEighthesFieldStateInterpolatorTest 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 ThreeEighthesFieldStateInterpolator<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 ThreeEighthesFieldIntegrator<T>(field, field.getOne());
46 }
47
48 @Test
49 public void interpolationAtBounds() {
50 doInterpolationAtBounds(Binary64Field.getInstance(), 1.0e-15);
51 }
52
53 @Test
54 public void interpolationInside() {
55 doInterpolationInside(Binary64Field.getInstance(), 2.6e-7, 3.6e-6);
56 }
57
58 @Test
59 public void nonFieldInterpolatorConsistency() {
60 doNonFieldInterpolatorConsistency(Binary64Field.getInstance(), 1.4e-17, 1.2e-16, 3.4e-16, 1.4e-17);
61 }
62
63 }