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 DormandPrince853FieldStateInterpolatorTest 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 DormandPrince853FieldStateInterpolator<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 DormandPrince853FieldIntegrator<T>(field, 0, 1, 1, 1);
46 }
47
48 @Test
49 public void interpolationAtBounds() {
50 doInterpolationAtBounds(Binary64Field.getInstance(), 1.0e-50);
51 }
52
53 @Test
54 public void interpolationInside() {
55 doInterpolationInside(Binary64Field.getInstance(), 3.1e-17, 3.4e-16);
56 }
57
58 @Test
59 public void nonFieldInterpolatorConsistency() {
60 doNonFieldInterpolatorConsistency(Binary64Field.getInstance(), 3.4e-12, 5.7e-11, 1.9e-10, 3.1e-9);
61 }
62
63 }