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.exception.MathIllegalArgumentException;
22 import org.hipparchus.exception.MathIllegalStateException;
23 import org.junit.Test;
24
25 public class AdamsMoultonIntegratorTest extends AdamsIntegratorAbstractTest {
26
27 protected AdamsIntegrator
28 createIntegrator(final int nSteps, final double minStep, final double maxStep,
29 final double scalAbsoluteTolerance, final double scalRelativeTolerance) {
30 return new AdamsMoultonIntegrator(nSteps, minStep, maxStep,
31 scalAbsoluteTolerance, scalRelativeTolerance);
32 }
33
34 protected AdamsIntegrator
35 createIntegrator(final int nSteps, final double minStep, final double maxStep,
36 final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance) {
37 return new AdamsMoultonIntegrator(nSteps, minStep, maxStep,
38 vecAbsoluteTolerance, vecRelativeTolerance);
39 }
40
41 @Test
42 public void testNbPoints() {
43 doNbPointsTest();
44 }
45
46 @Test(expected=MathIllegalArgumentException.class)
47 public void testMinStep() {
48 doDimensionCheck();
49 }
50
51 @Test
52 public void testIncreasingTolerance() {
53
54
55
56 doTestIncreasingTolerance(0.45, 8.69);
57 }
58
59 @Test(expected = MathIllegalStateException.class)
60 public void exceedMaxEvaluations() {
61 doExceedMaxEvaluations(650);
62 }
63
64 @Test
65 public void backward() {
66 doBackward(3.0e-9, 3.0e-9, 1.0e-16, "Adams-Moulton");
67 }
68
69 @Test
70 public void polynomial() {
71 doPolynomial(5, 2.2e-05, 2.0e-11);
72 }
73
74 @Test
75 public void testSecondaryEquations() {
76 doTestSecondaryEquations(1.9e-11, 7.2e-15);
77 }
78
79 @Test(expected=MathIllegalStateException.class)
80 public void testStartFailure() {
81 doTestStartFailure();
82 }
83
84 }