Interface FieldExplicitRungeKuttaIntegrator<T extends CalculusFieldElement<T>>
- Type Parameters:
T
- the type of the field elements
- All Superinterfaces:
FieldButcherArrayProvider<T>
,FieldODEIntegrator<T>
- All Known Implementing Classes:
ClassicalRungeKuttaFieldIntegrator
,DormandPrince54FieldIntegrator
,DormandPrince853FieldIntegrator
,EmbeddedRungeKuttaFieldIntegrator
,EulerFieldIntegrator
,GillFieldIntegrator
,HighamHall54FieldIntegrator
,LutherFieldIntegrator
,MidpointFieldIntegrator
,RungeKuttaFieldIntegrator
,ThreeEighthesFieldIntegrator
These methods are explicit Runge-Kutta methods, their Butcher arrays are as follows :
0 | c2 | a21 c3 | a31 a32 ... | ... cs | as1 as2 ... ass-1 |-------------------------- | b1 b2 ... bs-1 bs
- Since:
- 3.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends CalculusFieldElement<T>>
T[]applyExternalButcherWeights
(T[] y0, T[][] yDotK, T h, double[] b) Apply external weights of Butcher array, assuming internal ones have been applied.static <T extends CalculusFieldElement<T>>
T[]applyExternalButcherWeights
(T[] y0, T[][] yDotK, T h, T[] b) Apply external weights of Butcher array, assuming internal ones have been applied.static <T extends CalculusFieldElement<T>>
voidapplyInternalButcherWeights
(FieldExpandableODE<T> equations, T t0, T[] y0, T h, double[][] a, double[] c, T[][] yDotK) Apply internal weights of Butcher array, with corresponding times.static <T extends CalculusFieldElement<T>>
voidapplyInternalButcherWeights
(FieldExpandableODE<T> equations, T t0, T[] y0, T h, T[][] a, T[] c, T[][] yDotK) Apply internal weights of Butcher array, with corresponding times.static <T extends CalculusFieldElement<T>>
TCreate a fraction from doubles.static <T extends CalculusFieldElement<T>>
TCreate a fraction from integers.default int
Getter for the number of stages corresponding to the Butcher array.default double[][]
getRealA()
Get the internal weights from Butcher array (without the first empty row).default double[]
getRealB()
Get the external weights for the high order method from Butcher array.default double[]
getRealC()
Get the time steps from Butcher array (without the first zero).boolean
Getter for the flag between real or Field coefficients in the Butcher array.default T[]
singleStep
(FieldOrdinaryDifferentialEquation<T> equations, T t0, T[] y0, T t) Fast computation of a single step of ODE integration.Methods inherited from interface org.hipparchus.ode.nonstiff.FieldButcherArrayProvider
getA, getB, getC
Methods inherited from interface org.hipparchus.ode.FieldODEIntegrator
addEventDetector, addStepEndHandler, addStepHandler, clearEventDetectors, clearStepEndHandlers, clearStepHandlers, getCurrentSignedStepsize, getEvaluations, getEventDetectors, getMaxEvaluations, getName, getStepEndHandlers, getStepHandlers, getStepStart, integrate, setMaxEvaluations
-
Method Details
-
getRealC
default double[] getRealC()Get the time steps from Butcher array (without the first zero). Real version (non-Field).- Returns:
- time steps from Butcher array (without the first zero).
-
getRealA
default double[][] getRealA()Get the internal weights from Butcher array (without the first empty row). Real version (non-Field).- Returns:
- internal weights from Butcher array (without the first empty row)
-
getRealB
default double[] getRealB()Get the external weights for the high order method from Butcher array. Real version (non-Field).- Returns:
- external weights for the high order method from Butcher array
-
isUsingFieldCoefficients
boolean isUsingFieldCoefficients()Getter for the flag between real or Field coefficients in the Butcher array.- Returns:
- flag
-
getNumberOfStages
default int getNumberOfStages()Getter for the number of stages corresponding to the Butcher array.- Returns:
- number of stages
-
singleStep
Fast computation of a single step of ODE integration.This method is intended for the limited use case of very fast computation of only one step without using any of the rich features of general integrators that may take some time to set up (i.e. no step handlers, no events handlers, no additional states, no interpolators, no error control, no evaluations count, no sanity checks ...). It handles the strict minimum of computation, so it can be embedded in outer loops.
This method is not used at all by the
FieldODEIntegrator.integrate(FieldExpandableODE, org.hipparchus.ode.FieldODEState, CalculusFieldElement)
method. It also completely ignores the step set at construction time, and uses only a single step to go fromt0
tot
.As this method does not use any of the state-dependent features of the integrator, it should be reasonably thread-safe if and only if the provided differential equations are themselves thread-safe.
- Parameters:
equations
- differential equations to integratet0
- initial timey0
- initial value of the state vector at t0t
- target time for the integration (can be set to a value smaller thant0
for backward integration)- Returns:
- state vector at
t
-
fraction
Create a fraction from integers.- Type Parameters:
T
- the type of the field elements- Parameters:
field
- field to which elements belongp
- numeratorq
- denominator- Returns:
- p/q computed in the instance field
-
fraction
Create a fraction from doubles.- Type Parameters:
T
- the type of the field elements- Parameters:
field
- field to which elements belongp
- numeratorq
- denominator- Returns:
- p/q computed in the instance field
-
applyInternalButcherWeights
static <T extends CalculusFieldElement<T>> void applyInternalButcherWeights(FieldExpandableODE<T> equations, T t0, T[] y0, T h, T[][] a, T[] c, T[][] yDotK) Apply internal weights of Butcher array, with corresponding times.- Type Parameters:
T
- the type of the field elements- Parameters:
equations
- differential equations to integratet0
- initial timey0
- initial value of the state vector at t0h
- step sizea
- internal weights of Butcher arrayc
- times of Butcher arrayyDotK
- array where to store result
-
applyInternalButcherWeights
static <T extends CalculusFieldElement<T>> void applyInternalButcherWeights(FieldExpandableODE<T> equations, T t0, T[] y0, T h, double[][] a, double[] c, T[][] yDotK) Apply internal weights of Butcher array, with corresponding times. Version with real Butcher array (non-Field).- Type Parameters:
T
- the type of the field elements- Parameters:
equations
- differential equations to integratet0
- initial timey0
- initial value of the state vector at t0h
- step sizea
- internal weights of Butcher arrayc
- times of Butcher arrayyDotK
- array where to store result
-
applyExternalButcherWeights
static <T extends CalculusFieldElement<T>> T[] applyExternalButcherWeights(T[] y0, T[][] yDotK, T h, T[] b) Apply external weights of Butcher array, assuming internal ones have been applied.- Type Parameters:
T
- the type of the field elements- Parameters:
yDotK
- output of stagesy0
- initial value of the state vector at t0h
- step sizeb
- external weights of Butcher array- Returns:
- state vector
-
applyExternalButcherWeights
static <T extends CalculusFieldElement<T>> T[] applyExternalButcherWeights(T[] y0, T[][] yDotK, T h, double[] b) Apply external weights of Butcher array, assuming internal ones have been applied. Version with real Butcher array (non-Field version).- Type Parameters:
T
- the type of the field elements- Parameters:
yDotK
- output of stagesy0
- initial value of the state vector at t0h
- step sizeb
- external weights of Butcher array- Returns:
- state vector
-