Skip to content

Commit ea3a499

Browse files
committed
Rename RungeKutta(Field)Integrator as FixedStepRungeKutta(Field)Integrator
1 parent 301273d commit ea3a499

39 files changed

+83
-78
lines changed

hipparchus-core/src/test/java/org/hipparchus/analysis/differentiation/FieldGradientTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void testStackVariable() {
3333
// THEN
3434
Assertions.assertEquals(gradient.getValue(), gradientWithMoreVariable.getValue());
3535
Assertions.assertEquals(gradient.getFreeParameters() + 1, gradientWithMoreVariable.getFreeParameters());
36-
Assertions.assertEquals(0., gradientWithMoreVariable.getGradient[gradient.getFreeParameters().getReal()]);
36+
Assertions.assertEquals(0., gradientWithMoreVariable.getGradient()[gradient.getFreeParameters()].getReal());
3737
Assertions.assertArrayEquals(gradient.getGradient(), Arrays.copyOfRange(gradientWithMoreVariable.getGradient(),
3838
0, gradient.getFreeParameters()));
3939
}

hipparchus-core/src/test/java/org/hipparchus/analysis/differentiation/GradientTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void testStackVariable() {
103103
// THEN
104104
Assertions.assertEquals(gradient.getValue(), gradientWithMoreVariable.getValue());
105105
Assertions.assertEquals(gradient.getFreeParameters() + 1, gradientWithMoreVariable.getFreeParameters());
106-
Assertions.assertEquals(0., gradientWithMoreVariable.getGradient[gradient.getFreeParameters()]);
106+
Assertions.assertEquals(0., gradientWithMoreVariable.getGradient()[gradient.getFreeParameters()]);
107107
Assertions.assertArrayEquals(gradient.getGradient(), Arrays.copyOfRange(gradientWithMoreVariable.getGradient(),
108108
0, gradient.getFreeParameters()));
109109
}

hipparchus-ode/src/changes/changes.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,20 @@ If the output is not quite correct, check for invisible trailing spaces!
4848
<properties>
4949
<title>Hipparchus ODE Release Notes</title>
5050
</properties>
51-
<release version="4.0" date="TBD" description="TBD">
52-
<action dev="vincent" type="update" issue="issues/285">
53-
Migrated tests from JUnit 4 to JUnit 5
54-
</action>
55-
</release>
5651
<body>
5752
<release version="4.0" date="TBD" description="TBD">
53+
<action dev="serrof" type="update" issue="issues/372">
54+
Rename RungeKutta(Field)Integrator as FixedStepRungeKutta(Field)Integrator.
55+
</action>
5856
<action dev="serrof" type="update" issue="issues/361">
5957
Rename DEFAULT_MAXCHECK as DEFAULT_MAX_CHECK.
6058
</action>
6159
<action dev="serrof" type="add" issue="issues/335">
6260
Add boolean for propagation direction in (Field)AdaptableInterval.
6361
</action>
62+
<action dev="vincent" type="update" issue="issues/285">
63+
Migrated tests from JUnit 4 to JUnit 5
64+
</action>
6465
</release>
6566
<release version="3.1" date="2024-04-05" description="This is a maintenance release. It includes one
6667
bugfixes and adds two features on existing integrators.">

hipparchus-ode/src/conf/spotbugs-exclude-filter.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
<Bug pattern="EI_EXPOSE_REP2" />
114114
</Match>
115115
<Match>
116-
<Class name="org.hipparchus.ode.nonstiff.RungeKuttaFieldIntegrator"/>
116+
<Class name="org.hipparchus.ode.nonstiff.FixedStepRungeKuttaFieldIntegrator"/>
117117
<Method name="getDefaultStep"/>
118118
<Bug pattern="EI_EXPOSE_REP" />
119119
</Match>

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/ButcherArrayProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
package org.hipparchus.ode.nonstiff;
1919

2020
/** This interface represents an integrator based on Butcher arrays.
21-
* @see RungeKuttaIntegrator
21+
* @see FixedStepRungeKuttaIntegrator
2222
* @see EmbeddedRungeKuttaIntegrator
2323
*/
2424
public interface ButcherArrayProvider {

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/ClassicalRungeKuttaFieldIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
*/
5454

5555
public class ClassicalRungeKuttaFieldIntegrator<T extends CalculusFieldElement<T>>
56-
extends RungeKuttaFieldIntegrator<T> {
56+
extends FixedStepRungeKuttaFieldIntegrator<T> {
5757

5858
/** Name of integration scheme. */
5959
public static final String METHOD_NAME = ClassicalRungeKuttaIntegrator.METHOD_NAME;

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/ClassicalRungeKuttaIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* @see LutherIntegrator
4444
*/
4545

46-
public class ClassicalRungeKuttaIntegrator extends RungeKuttaIntegrator {
46+
public class ClassicalRungeKuttaIntegrator extends FixedStepRungeKuttaIntegrator {
4747

4848
/** Name of integration scheme. */
4949
public static final String METHOD_NAME = "classical Runge-Kutta";

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/EulerFieldIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
* @param <T> the type of the field elements
5757
*/
5858

59-
public class EulerFieldIntegrator<T extends CalculusFieldElement<T>> extends RungeKuttaFieldIntegrator<T> {
59+
public class EulerFieldIntegrator<T extends CalculusFieldElement<T>> extends FixedStepRungeKuttaFieldIntegrator<T> {
6060

6161
/** Name of integration scheme. */
6262
public static final String METHOD_NAME = EulerIntegrator.METHOD_NAME;

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/EulerIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
* @see LutherIntegrator
4848
*/
4949

50-
public class EulerIntegrator extends RungeKuttaIntegrator {
50+
public class EulerIntegrator extends FixedStepRungeKuttaIntegrator {
5151

5252
/** Name of integration scheme. */
5353
public static final String METHOD_NAME = "Euler";

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/ExplicitRungeKuttaIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* </pre>
4141
*
4242
* @see ButcherArrayProvider
43-
* @see RungeKuttaIntegrator
43+
* @see FixedStepRungeKuttaIntegrator
4444
* @see EmbeddedRungeKuttaIntegrator
4545
* @since 3.1
4646
*/

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/FieldButcherArrayProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.hipparchus.CalculusFieldElement;
2626

2727
/** This interface represents an integrator based on Butcher arrays.
28-
* @see RungeKuttaFieldIntegrator
28+
* @see FixedStepRungeKuttaFieldIntegrator
2929
* @see EmbeddedRungeKuttaFieldIntegrator
3030
* @param <T> the type of the field elements
3131
*/

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/FieldExplicitRungeKuttaIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* </pre>
4444
*
4545
* @see FieldButcherArrayProvider
46-
* @see RungeKuttaFieldIntegrator
46+
* @see FixedStepRungeKuttaFieldIntegrator
4747
* @see EmbeddedRungeKuttaFieldIntegrator
4848
* @param <T> the type of the field elements
4949
* @since 3.1

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/RungeKuttaFieldIntegrator.java renamed to hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/FixedStepRungeKuttaFieldIntegrator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
* @param <T> the type of the field elements
5858
*/
5959

60-
public abstract class RungeKuttaFieldIntegrator<T extends CalculusFieldElement<T>>
60+
public abstract class FixedStepRungeKuttaFieldIntegrator<T extends CalculusFieldElement<T>>
6161
extends AbstractFieldIntegrator<T> implements FieldExplicitRungeKuttaIntegrator<T> {
6262

6363
/** Time steps from Butcher array (without the first zero). */
@@ -91,7 +91,7 @@ public abstract class RungeKuttaFieldIntegrator<T extends CalculusFieldElement<T
9191
* @param name name of the method
9292
* @param step integration step
9393
*/
94-
protected RungeKuttaFieldIntegrator(final Field<T> field, final String name, final T step) {
94+
protected FixedStepRungeKuttaFieldIntegrator(final Field<T> field, final String name, final T step) {
9595
super(field, name);
9696
this.c = getC();
9797
this.a = getA();

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/RungeKuttaIntegrator.java renamed to hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/FixedStepRungeKuttaIntegrator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
* @see MidpointIntegrator
5151
*/
5252

53-
public abstract class RungeKuttaIntegrator extends AbstractIntegrator implements ExplicitRungeKuttaIntegrator {
53+
public abstract class FixedStepRungeKuttaIntegrator extends AbstractIntegrator
54+
implements ExplicitRungeKuttaIntegrator {
5455

5556
/** Time steps from Butcher array (without the first zero). */
5657
private final double[] c;
@@ -70,7 +71,7 @@ public abstract class RungeKuttaIntegrator extends AbstractIntegrator implements
7071
* @param name name of the method
7172
* @param step integration step
7273
*/
73-
protected RungeKuttaIntegrator(final String name, final double step) {
74+
protected FixedStepRungeKuttaIntegrator(final String name, final double step) {
7475
super(name);
7576
this.c = getC();
7677
this.a = getA();

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/GillFieldIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
*/
5555

5656
public class GillFieldIntegrator<T extends CalculusFieldElement<T>>
57-
extends RungeKuttaFieldIntegrator<T> {
57+
extends FixedStepRungeKuttaFieldIntegrator<T> {
5858

5959
/** Name of integration scheme. */
6060
public static final String METHOD_NAME = GillIntegrator.METHOD_NAME;

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/GillIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
* @see LutherIntegrator
4646
*/
4747

48-
public class GillIntegrator extends RungeKuttaIntegrator {
48+
public class GillIntegrator extends FixedStepRungeKuttaIntegrator {
4949

5050
/** Name of integration scheme. */
5151
public static final String METHOD_NAME = "Gill";

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/LutherFieldIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
*/
6464

6565
public class LutherFieldIntegrator<T extends CalculusFieldElement<T>>
66-
extends RungeKuttaFieldIntegrator<T> {
66+
extends FixedStepRungeKuttaFieldIntegrator<T> {
6767

6868
/** Name of integration scheme. */
6969
public static final String METHOD_NAME = LutherIntegrator.METHOD_NAME;

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/LutherIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
* @see ThreeEighthesIntegrator
5555
*/
5656

57-
public class LutherIntegrator extends RungeKuttaIntegrator {
57+
public class LutherIntegrator extends FixedStepRungeKuttaIntegrator {
5858

5959
/** Name of integration scheme. */
6060
public static final String METHOD_NAME = "Luther";

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/MidpointFieldIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* @param <T> the type of the field elements
5151
*/
5252

53-
public class MidpointFieldIntegrator<T extends CalculusFieldElement<T>> extends RungeKuttaFieldIntegrator<T> {
53+
public class MidpointFieldIntegrator<T extends CalculusFieldElement<T>> extends FixedStepRungeKuttaFieldIntegrator<T> {
5454

5555
/** Name of integration scheme. */
5656
public static final String METHOD_NAME = MidpointIntegrator.METHOD_NAME;

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/MidpointIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
*
4242
*/
4343

44-
public class MidpointIntegrator extends RungeKuttaIntegrator {
44+
public class MidpointIntegrator extends FixedStepRungeKuttaIntegrator {
4545

4646
/** Name of integration scheme. */
4747
public static final String METHOD_NAME = "midpoint";

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/RungeKuttaFieldStateInterpolator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
/** This class represents an interpolator over the last step during an
3333
* ODE integration for Runge-Kutta and embedded Runge-Kutta integrators.
3434
*
35-
* @see RungeKuttaFieldIntegrator
35+
* @see FixedStepRungeKuttaFieldIntegrator
3636
* @see EmbeddedRungeKuttaFieldIntegrator
3737
*
3838
* @param <T> the type of the field elements

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/RungeKuttaStateInterpolator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/** This class represents an interpolator over the last step during an
2525
* ODE integration for Runge-Kutta and embedded Runge-Kutta integrators.
2626
*
27-
* @see RungeKuttaIntegrator
27+
* @see FixedStepRungeKuttaIntegrator
2828
* @see EmbeddedRungeKuttaIntegrator
2929
*
3030
*/

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/ThreeEighthesFieldIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
*/
5353

5454
public class ThreeEighthesFieldIntegrator<T extends CalculusFieldElement<T>>
55-
extends RungeKuttaFieldIntegrator<T> {
55+
extends FixedStepRungeKuttaFieldIntegrator<T> {
5656

5757
/** Name of integration scheme. */
5858
public static final String METHOD_NAME = ThreeEighthesIntegrator.METHOD_NAME;

hipparchus-ode/src/main/java/org/hipparchus/ode/nonstiff/ThreeEighthesIntegrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* @see LutherIntegrator
4343
*/
4444

45-
public class ThreeEighthesIntegrator extends RungeKuttaIntegrator {
45+
public class ThreeEighthesIntegrator extends FixedStepRungeKuttaIntegrator {
4646

4747
/** Name of integration scheme. */
4848
public static final String METHOD_NAME = "3/8";

hipparchus-ode/src/test/java/org/hipparchus/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
class ClassicalRungeKuttaFieldIntegratorTest extends RungeKuttaFieldIntegratorAbstractTest {
2727

28-
protected <T extends CalculusFieldElement<T>> RungeKuttaFieldIntegrator<T>
28+
protected <T extends CalculusFieldElement<T>> FixedStepRungeKuttaFieldIntegrator<T>
2929
createIntegrator(Field<T> field, T step) {
3030
return new ClassicalRungeKuttaFieldIntegrator<T>(field, step);
3131
}

hipparchus-ode/src/test/java/org/hipparchus/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class ClassicalRungeKuttaIntegratorTest extends RungeKuttaIntegratorAbstractTest {
2323

24-
protected RungeKuttaIntegrator createIntegrator(double step) {
24+
protected FixedStepRungeKuttaIntegrator createIntegrator(double step) {
2525
return new ClassicalRungeKuttaIntegrator(step);
2626
}
2727

hipparchus-ode/src/test/java/org/hipparchus/ode/nonstiff/EulerFieldIntegratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
class EulerFieldIntegratorTest extends RungeKuttaFieldIntegratorAbstractTest {
2727

28-
protected <T extends CalculusFieldElement<T>> RungeKuttaFieldIntegrator<T>
28+
protected <T extends CalculusFieldElement<T>> FixedStepRungeKuttaFieldIntegrator<T>
2929
createIntegrator(Field<T> field, T step) {
3030
return new EulerFieldIntegrator<T>(field, step);
3131
}

hipparchus-ode/src/test/java/org/hipparchus/ode/nonstiff/EulerIntegratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class EulerIntegratorTest extends RungeKuttaIntegratorAbstractTest {
2323

24-
protected RungeKuttaIntegrator createIntegrator(double step) {
24+
protected FixedStepRungeKuttaIntegrator createIntegrator(double step) {
2525
return new EulerIntegrator(step);
2626
}
2727

hipparchus-ode/src/test/java/org/hipparchus/ode/nonstiff/GillFieldIntegratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
class GillFieldIntegratorTest extends RungeKuttaFieldIntegratorAbstractTest {
2727

28-
protected <T extends CalculusFieldElement<T>> RungeKuttaFieldIntegrator<T>
28+
protected <T extends CalculusFieldElement<T>> FixedStepRungeKuttaFieldIntegrator<T>
2929
createIntegrator(Field<T> field, T step) {
3030
return new GillFieldIntegrator<T>(field, step);
3131
}

hipparchus-ode/src/test/java/org/hipparchus/ode/nonstiff/GillIntegratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class GillIntegratorTest extends RungeKuttaIntegratorAbstractTest {
2323

24-
protected RungeKuttaIntegrator createIntegrator(double step) {
24+
protected FixedStepRungeKuttaIntegrator createIntegrator(double step) {
2525
return new GillIntegrator(step);
2626
}
2727

hipparchus-ode/src/test/java/org/hipparchus/ode/nonstiff/LutherFieldIntegratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
class LutherFieldIntegratorTest extends RungeKuttaFieldIntegratorAbstractTest {
2929

30-
protected <T extends CalculusFieldElement<T>> RungeKuttaFieldIntegrator<T>
30+
protected <T extends CalculusFieldElement<T>> FixedStepRungeKuttaFieldIntegrator<T>
3131
createIntegrator(Field<T> field, T step) {
3232
return new LutherFieldIntegrator<T>(field, step);
3333
}

hipparchus-ode/src/test/java/org/hipparchus/ode/nonstiff/LutherIntegratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class LutherIntegratorTest extends RungeKuttaIntegratorAbstractTest {
2323

24-
protected RungeKuttaIntegrator createIntegrator(double step) {
24+
protected FixedStepRungeKuttaIntegrator createIntegrator(double step) {
2525
return new LutherIntegrator(step);
2626
}
2727

hipparchus-ode/src/test/java/org/hipparchus/ode/nonstiff/MidpointFieldIntegratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
class MidpointFieldIntegratorTest extends RungeKuttaFieldIntegratorAbstractTest {
2727

28-
protected <T extends CalculusFieldElement<T>> RungeKuttaFieldIntegrator<T>
28+
protected <T extends CalculusFieldElement<T>> FixedStepRungeKuttaFieldIntegrator<T>
2929
createIntegrator(Field<T> field, T step) {
3030
return new MidpointFieldIntegrator<T>(field, step);
3131
}

hipparchus-ode/src/test/java/org/hipparchus/ode/nonstiff/MidpointIntegratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class MidpointIntegratorTest extends RungeKuttaIntegratorAbstractTest {
2323

24-
protected RungeKuttaIntegrator createIntegrator(double step) {
24+
protected FixedStepRungeKuttaIntegrator createIntegrator(double step) {
2525
return new MidpointIntegrator(step);
2626
}
2727

0 commit comments

Comments
 (0)