T
- the type of the field elementspublic abstract class AbstractFieldStepInterpolator<T extends RealFieldElement<T>> extends Object implements FieldStepInterpolator<T>
The various ODE integrators provide objects extending this class to the step handlers. The handlers can use these objects to retrieve the state vector at intermediate times between the previous and the current grid points (dense output).
FirstOrderFieldIntegrator
,
StepHandler
Modifier | Constructor and Description |
---|---|
protected |
AbstractFieldStepInterpolator(boolean isForward,
FieldODEStateAndDerivative<T> globalPreviousState,
FieldODEStateAndDerivative<T> globalCurrentState,
FieldODEStateAndDerivative<T> softPreviousState,
FieldODEStateAndDerivative<T> softCurrentState,
FieldEquationsMapper<T> equationsMapper)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract FieldODEStateAndDerivative<T> |
computeInterpolatedStateAndDerivatives(FieldEquationsMapper<T> equationsMapper,
T time,
T theta,
T thetaH,
T oneMinusThetaH)
Compute the state and derivatives at the interpolated time.
|
protected abstract AbstractFieldStepInterpolator<T> |
create(boolean newForward,
FieldODEStateAndDerivative<T> newGlobalPreviousState,
FieldODEStateAndDerivative<T> newGlobalCurrentState,
FieldODEStateAndDerivative<T> newSoftPreviousState,
FieldODEStateAndDerivative<T> newSoftCurrentState,
FieldEquationsMapper<T> newMapper)
Create a new instance.
|
FieldODEStateAndDerivative<T> |
getCurrentState()
Get the state at current grid point time.
|
FieldODEStateAndDerivative<T> |
getGlobalCurrentState()
Get the current global grid point state.
|
FieldODEStateAndDerivative<T> |
getGlobalPreviousState()
Get the previous global grid point state.
|
FieldODEStateAndDerivative<T> |
getInterpolatedState(T time)
Get the state at interpolated time.
|
FieldODEStateAndDerivative<T> |
getPreviousState()
Get the state at previous grid point time.
|
boolean |
isForward()
Check if the natural integration direction is forward.
|
AbstractFieldStepInterpolator<T> |
restrictStep(FieldODEStateAndDerivative<T> previousState,
FieldODEStateAndDerivative<T> currentState)
Create a new restricted version of the instance.
|
protected AbstractFieldStepInterpolator(boolean isForward, FieldODEStateAndDerivative<T> globalPreviousState, FieldODEStateAndDerivative<T> globalCurrentState, FieldODEStateAndDerivative<T> softPreviousState, FieldODEStateAndDerivative<T> softCurrentState, FieldEquationsMapper<T> equationsMapper)
isForward
- integration direction indicatorglobalPreviousState
- start of the global stepglobalCurrentState
- end of the global stepsoftPreviousState
- start of the restricted stepsoftCurrentState
- end of the restricted stepequationsMapper
- mapper for ODE equations primary and secondary componentspublic AbstractFieldStepInterpolator<T> restrictStep(FieldODEStateAndDerivative<T> previousState, FieldODEStateAndDerivative<T> currentState)
The instance is not changed at all.
previousState
- start of the restricted stepcurrentState
- end of the restricted stepgetPreviousState()
,
getCurrentState()
protected abstract AbstractFieldStepInterpolator<T> create(boolean newForward, FieldODEStateAndDerivative<T> newGlobalPreviousState, FieldODEStateAndDerivative<T> newGlobalCurrentState, FieldODEStateAndDerivative<T> newSoftPreviousState, FieldODEStateAndDerivative<T> newSoftCurrentState, FieldEquationsMapper<T> newMapper)
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 equationspublic FieldODEStateAndDerivative<T> getGlobalPreviousState()
public FieldODEStateAndDerivative<T> getGlobalCurrentState()
public FieldODEStateAndDerivative<T> getPreviousState()
getPreviousState
in interface FieldStepInterpolator<T extends RealFieldElement<T>>
public FieldODEStateAndDerivative<T> getCurrentState()
getCurrentState
in interface FieldStepInterpolator<T extends RealFieldElement<T>>
public FieldODEStateAndDerivative<T> getInterpolatedState(T time)
Setting the time outside of the current step is allowed, but should be used with care since the accuracy of the interpolator will probably be very poor far from this step. This allowance has been added to simplify implementation of search algorithms near the step endpoints.
getInterpolatedState
in interface FieldStepInterpolator<T extends RealFieldElement<T>>
time
- time of the interpolated pointpublic boolean isForward()
This method provides the integration direction as specified by the integrator itself, it avoid some nasty problems in degenerated cases like null steps due to cancellation at step initialization, step control or discrete events triggering.
isForward
in interface FieldStepInterpolator<T extends RealFieldElement<T>>
protected abstract FieldODEStateAndDerivative<T> computeInterpolatedStateAndDerivatives(FieldEquationsMapper<T> equationsMapper, T time, T theta, T thetaH, T oneMinusThetaH) throws MaxCountExceededException
equationsMapper
- mapper for ODE equations primary and secondary componentstime
- interpolation timetheta
- normalized interpolation abscissa within the step
(theta is zero at the previous time step and one at the current time step)thetaH
- time gap between the previous time and the interpolated timeoneMinusThetaH
- time gap between the interpolated time and
the current timeMaxCountExceededException
- if the number of functions evaluations is exceededCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.