Class RungeKuttaFieldStepInterpolator<T extends RealFieldElement<T>>
- java.lang.Object
-
- org.apache.commons.math3.ode.sampling.AbstractFieldStepInterpolator<T>
-
- org.apache.commons.math3.ode.nonstiff.RungeKuttaFieldStepInterpolator<T>
-
- Type Parameters:
T- the type of the field elements
- All Implemented Interfaces:
FieldStepInterpolator<T>
- Direct Known Subclasses:
ClassicalRungeKuttaFieldStepInterpolator,DormandPrince54FieldStepInterpolator,DormandPrince853FieldStepInterpolator,EulerFieldStepInterpolator,GillFieldStepInterpolator,HighamHall54FieldStepInterpolator,LutherFieldStepInterpolator,MidpointFieldStepInterpolator,ThreeEighthesFieldStepInterpolator
abstract class RungeKuttaFieldStepInterpolator<T extends RealFieldElement<T>> extends AbstractFieldStepInterpolator<T>
This class represents an interpolator over the last step during an ODE integration for Runge-Kutta and embedded Runge-Kutta integrators.- Since:
- 3.6
- See Also:
RungeKuttaFieldIntegrator,EmbeddedRungeKuttaFieldIntegrator
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRungeKuttaFieldStepInterpolator(Field<T> field, boolean forward, T[][] yDotK, FieldODEStateAndDerivative<T> globalPreviousState, FieldODEStateAndDerivative<T> globalCurrentState, FieldODEStateAndDerivative<T> softPreviousState, FieldODEStateAndDerivative<T> softCurrentState, FieldEquationsMapper<T> mapper)Simple constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private T[]combine(T[] a, T... coefficients)Linearly combine arrays.protected RungeKuttaFieldStepInterpolator<T>create(boolean newForward, FieldODEStateAndDerivative<T> newGlobalPreviousState, FieldODEStateAndDerivative<T> newGlobalCurrentState, FieldODEStateAndDerivative<T> newSoftPreviousState, FieldODEStateAndDerivative<T> newSoftCurrentState, FieldEquationsMapper<T> newMapper)Create a new instance.protected abstract RungeKuttaFieldStepInterpolator<T>create(Field<T> newField, boolean newForward, T[][] newYDotK, FieldODEStateAndDerivative<T> newGlobalPreviousState, FieldODEStateAndDerivative<T> newGlobalCurrentState, FieldODEStateAndDerivative<T> newSoftPreviousState, FieldODEStateAndDerivative<T> newSoftCurrentState, FieldEquationsMapper<T> newMapper)Create a new instance.protected T[]currentStateLinearCombination(T... coefficients)Compute a state by linear combination added to current state.protected T[]derivativeLinearCombination(T... coefficients)Compute a state derivative by linear combination.protected T[]previousStateLinearCombination(T... coefficients)Compute a state by linear combination added to previous state.-
Methods inherited from class org.apache.commons.math3.ode.sampling.AbstractFieldStepInterpolator
computeInterpolatedStateAndDerivatives, getCurrentState, getGlobalCurrentState, getGlobalPreviousState, getInterpolatedState, getPreviousState, isForward, restrictStep
-
-
-
-
Field Detail
-
field
private final Field<T extends RealFieldElement<T>> field
Field to which the time and state vector elements belong.
-
yDotK
private final T extends RealFieldElement<T>[][] yDotK
Slopes at the intermediate points.
-
-
Constructor Detail
-
RungeKuttaFieldStepInterpolator
protected RungeKuttaFieldStepInterpolator(Field<T> field, boolean forward, T[][] yDotK, FieldODEStateAndDerivative<T> globalPreviousState, FieldODEStateAndDerivative<T> globalCurrentState, FieldODEStateAndDerivative<T> softPreviousState, FieldODEStateAndDerivative<T> softCurrentState, FieldEquationsMapper<T> mapper)
Simple constructor.- Parameters:
field- field to which the time and state vector elements belongforward- integration direction indicatoryDotK- slopes at the intermediate pointsglobalPreviousState- start of the global stepglobalCurrentState- end of the global stepsoftPreviousState- start of the restricted stepsoftCurrentState- end of the restricted stepmapper- equations mapper for the all equations
-
-
Method Detail
-
create
protected RungeKuttaFieldStepInterpolator<T> create(boolean newForward, FieldODEStateAndDerivative<T> newGlobalPreviousState, FieldODEStateAndDerivative<T> newGlobalCurrentState, FieldODEStateAndDerivative<T> newSoftPreviousState, FieldODEStateAndDerivative<T> newSoftCurrentState, FieldEquationsMapper<T> newMapper)
Create a new instance.- Specified by:
createin classAbstractFieldStepInterpolator<T extends RealFieldElement<T>>- Parameters:
newForward- integration direction indicatornewGlobalPreviousState- start of the global stepnewGlobalCurrentState- end of the global stepnewSoftPreviousState- start of the restricted stepnewSoftCurrentState- end of the restricted stepnewMapper- equations mapper for the all equations- Returns:
- a new instance
-
create
protected abstract RungeKuttaFieldStepInterpolator<T> create(Field<T> newField, boolean newForward, T[][] newYDotK, FieldODEStateAndDerivative<T> newGlobalPreviousState, FieldODEStateAndDerivative<T> newGlobalCurrentState, FieldODEStateAndDerivative<T> newSoftPreviousState, FieldODEStateAndDerivative<T> newSoftCurrentState, FieldEquationsMapper<T> newMapper)
Create a new instance.- Parameters:
newField- field to which the time and state vector elements belongnewForward- integration direction indicatornewYDotK- slopes at the intermediate pointsnewGlobalPreviousState- start of the global stepnewGlobalCurrentState- end of the global stepnewSoftPreviousState- start of the restricted stepnewSoftCurrentState- end of the restricted stepnewMapper- equations mapper for the all equations- Returns:
- a new instance
-
previousStateLinearCombination
protected final T[] previousStateLinearCombination(T... coefficients)
Compute a state by linear combination added to previous state.- Parameters:
coefficients- coefficients to apply to the method staged derivatives- Returns:
- combined state
-
currentStateLinearCombination
protected T[] currentStateLinearCombination(T... coefficients)
Compute a state by linear combination added to current state.- Parameters:
coefficients- coefficients to apply to the method staged derivatives- Returns:
- combined state
-
derivativeLinearCombination
protected T[] derivativeLinearCombination(T... coefficients)
Compute a state derivative by linear combination.- Parameters:
coefficients- coefficients to apply to the method staged derivatives- Returns:
- combined state
-
-