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

pack-priv Class DormandPrince853FieldStepInterpolator<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.exception.MaxCountExceededException, org.apache.commons.math3.ode.FieldEquationsMapper, .FieldODEStateAndDerivative, org.apache.commons.math3.util.MathArrays

This class represents an interpolator over the last step during an ODE integration for the 8(5,3) Dormand-Prince integrator.
Since
3.6
See Also
DormandPrince853FieldIntegrator

Field Summary

Modifier and TypeField and Description
private final T[][]
d

Interpolation weights.

Constructor Summary

AccessConstructor and Description
pack-priv
DormandPrince853FieldStepInterpolator(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 DormandPrince853FieldStepInterpolator<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.

private T

Returns:

p/q computed in the instance field
fraction
(final Field<T>
field to which the elements belong
field
,
final double
numerator
p
,
final double
denominator
q
)

Create a fraction.

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

Field Detail

dback to summary
private final T[][] d

Interpolation weights. (beware that only the non-null values are in the table)

Constructor Detail

DormandPrince853FieldStepInterpolatorback to summary
pack-priv DormandPrince853FieldStepInterpolator(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) throws MaxCountExceededException

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
Exceptions
MaxCountExceededException:
if the number of functions evaluations is exceeded
createback to summary
protected DormandPrince853FieldStepInterpolator<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:DormandPrince853FieldStepInterpolator<T>

a new instance

Annotations
@Override
fractionback to summary
private T fraction(final Field<T> field, final double p, final double q)

Create a fraction.

Parameters
field:Field<T>

field to which the elements belong

p:double

numerator

q:double

denominator

Returns:T

p/q computed in the instance field