Top Description Constructors Methods
org.apache.commons.math3.ode.nonstiff

pack-priv Class MidpointFieldStepInterpolator<T extends RealFieldElement<T>>

extends RungeKuttaFieldStepInterpolator<T extends RealFieldElement<T>>
Class Inheritance
Type Parameters
<T>
the type of the field elements
Imports
org.apache.commons.math3.Field, .RealFieldElement, org.apache.commons.math3.ode.FieldEquationsMapper, .FieldODEStateAndDerivative

This class implements a step interpolator for second order Runge-Kutta integrator.

This interpolator computes dense output inside the last step computed. The interpolation equation is consistent with the integration scheme :

where θ belongs to [0 ; 1] and where y'1 and y'2 are the two evaluations of the derivatives already computed during the step.

Since
3.6
See Also
MidpointFieldIntegrator

Constructor Summary

AccessConstructor and Description
pack-priv
MidpointFieldStepInterpolator(final Field<T>
field to which the time and state vector elements belong
field
,
final boolean
integration direction indicator
forward
,
final T[][]
slopes at the intermediate points
yDotK
,
final FieldODEStateAndDerivative<T>
start of the global step
globalPreviousState
,
final FieldODEStateAndDerivative<T>
end of the global step
globalCurrentState
,
final FieldODEStateAndDerivative<T>
start of the restricted step
softPreviousState
,
final FieldODEStateAndDerivative<T>
end of the restricted step
softCurrentState
,
final FieldEquationsMapper<T>
equations mapper for the all equations
mapper
)

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
protected FieldODEStateAndDerivative<T>
computeInterpolatedStateAndDerivatives(final FieldEquationsMapper<T>
mapper for ODE equations primary and secondary components
mapper
,
final T
interpolation time
time
,
final T
normalized interpolation abscissa within the step (theta is zero at the previous time step and one at the current time step)
theta
,
final T
time gap between the previous time and the interpolated time
thetaH
,
final T
time gap between the interpolated time and the current time
oneMinusThetaH
)

Implements abstract org.apache.commons.math3.ode.sampling.AbstractFieldStepInterpolator.computeInterpolatedStateAndDerivatives.

Compute the state and derivatives at the interpolated time.

protected MidpointFieldStepInterpolator<T>
create(final Field<T>
field to which the time and state vector elements belong
newField
,
final boolean
integration direction indicator
newForward
,
final T[][]
slopes at the intermediate points
newYDotK
,
final FieldODEStateAndDerivative<T>
start of the global step
newGlobalPreviousState
,
final FieldODEStateAndDerivative<T>
end of the global step
newGlobalCurrentState
,
final FieldODEStateAndDerivative<T>
start of the restricted step
newSoftPreviousState
,
final FieldODEStateAndDerivative<T>
end of the restricted step
newSoftCurrentState
,
final FieldEquationsMapper<T>
equations mapper for the all equations
newMapper
)

Implements abstract org.apache.commons.math3.ode.nonstiff.RungeKuttaFieldStepInterpolator.create.

Create a new instance.

Inherited from org.apache.commons.math3.ode.nonstiff.RungeKuttaFieldStepInterpolator:
createcurrentStateLinearCombinationderivativeLinearCombinationpreviousStateLinearCombination

Constructor Detail

MidpointFieldStepInterpolatorback to summary
pack-priv MidpointFieldStepInterpolator(final Field<T> field, final boolean forward, final T[][] yDotK, final FieldODEStateAndDerivative<T> globalPreviousState, final FieldODEStateAndDerivative<T> globalCurrentState, final FieldODEStateAndDerivative<T> softPreviousState, final FieldODEStateAndDerivative<T> softCurrentState, final FieldEquationsMapper<T> mapper)

Simple constructor.

Parameters
field:Field<T>

field to which the time and state vector elements belong

forward:boolean

integration direction indicator

yDotK:T[][]

slopes at the intermediate points

globalPreviousState:FieldODEStateAndDerivative<T>

start of the global step

globalCurrentState:FieldODEStateAndDerivative<T>

end of the global step

softPreviousState:FieldODEStateAndDerivative<T>

start of the restricted step

softCurrentState:FieldODEStateAndDerivative<T>

end of the restricted step

mapper:FieldEquationsMapper<T>

equations mapper for the all equations

Method Detail

computeInterpolatedStateAndDerivativesback to summary
protected FieldODEStateAndDerivative<T> computeInterpolatedStateAndDerivatives(final FieldEquationsMapper<T> mapper, final T time, final T theta, final T thetaH, final T oneMinusThetaH)

Implements abstract org.apache.commons.math3.ode.sampling.AbstractFieldStepInterpolator.computeInterpolatedStateAndDerivatives.

Doc from org.apache.commons.math3.ode.sampling.AbstractFieldStepInterpolator.computeInterpolatedStateAndDerivatives.

Compute the state and derivatives at the interpolated time. This is the main processing method that should be implemented by the derived classes to perform the interpolation.

Parameters
mapper:FieldEquationsMapper<T>

mapper for ODE equations primary and secondary components

time:T

interpolation time

theta:T

normalized interpolation abscissa within the step (theta is zero at the previous time step and one at the current time step)

thetaH:T

time gap between the previous time and the interpolated time

oneMinusThetaH:T

time gap between the interpolated time and the current time

Returns:FieldODEStateAndDerivative<T>

interpolated state and derivatives

Annotations
@SuppressWarnings:unchecked
@Override
createback to summary
protected MidpointFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalCurrentState, final FieldODEStateAndDerivative<T> newSoftPreviousState, final FieldODEStateAndDerivative<T> newSoftCurrentState, final FieldEquationsMapper<T> newMapper)

Implements abstract org.apache.commons.math3.ode.nonstiff.RungeKuttaFieldStepInterpolator.create.

Doc from org.apache.commons.math3.ode.nonstiff.RungeKuttaFieldStepInterpolator.create.

Create a new instance.

Parameters
newField:Field<T>

field to which the time and state vector elements belong

newForward:boolean

integration direction indicator

newYDotK:T[][]

slopes at the intermediate points

newGlobalPreviousState:FieldODEStateAndDerivative<T>

start of the global step

newGlobalCurrentState:FieldODEStateAndDerivative<T>

end of the global step

newSoftPreviousState:FieldODEStateAndDerivative<T>

start of the restricted step

newSoftCurrentState:FieldODEStateAndDerivative<T>

end of the restricted step

newMapper:FieldEquationsMapper<T>

equations mapper for the all equations

Returns:MidpointFieldStepInterpolator<T>

a new instance

Annotations
@Override