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

pack-priv abstract Class RungeKuttaFieldStepInterpolator<T extends RealFieldElement<T>>

extends AbstractFieldStepInterpolator<T extends RealFieldElement<T>>
Class Inheritance
Known Direct Subclasses
org.apache.commons.math3.ode.nonstiff.ThreeEighthesFieldStepInterpolator, org.apache.commons.math3.ode.nonstiff.DormandPrince853FieldStepInterpolator, org.apache.commons.math3.ode.nonstiff.EulerFieldStepInterpolator, org.apache.commons.math3.ode.nonstiff.GillFieldStepInterpolator, org.apache.commons.math3.ode.nonstiff.ClassicalRungeKuttaFieldStepInterpolator, org.apache.commons.math3.ode.nonstiff.DormandPrince54FieldStepInterpolator, org.apache.commons.math3.ode.nonstiff.HighamHall54FieldStepInterpolator, org.apache.commons.math3.ode.nonstiff.LutherFieldStepInterpolator, org.apache.commons.math3.ode.nonstiff.MidpointFieldStepInterpolator
Type Parameters
<T>
the type of the field elements
Imports
org.apache.commons.math3.Field, .RealFieldElement, org.apache.commons.math3.ode.FieldEquationsMapper, .FieldODEStateAndDerivative, org.apache.commons.math3.ode.sampling.AbstractFieldStepInterpolator, org.apache.commons.math3.util.MathArrays

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

Field Summary

Modifier and TypeField and Description
private final Field<T>
field

Field to which the time and state vector elements belong.

private final T[][]
yDotK

Slopes at the intermediate points.

Constructor Summary

AccessConstructor and Description
protected
RungeKuttaFieldStepInterpolator(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
private T[]

Returns:

a itself, as a convenience for fluent API
combine
(final T[]
array to add to
a
,
final T...
coefficients to apply to the method staged derivatives
coefficients
)

Linearly combine arrays.

protected RungeKuttaFieldStepInterpolator<T>
create(boolean
integration direction indicator
newForward
,
FieldODEStateAndDerivative<T>
start of the global step
newGlobalPreviousState
,
FieldODEStateAndDerivative<T>
end of the global step
newGlobalCurrentState
,
FieldODEStateAndDerivative<T>
start of the restricted step
newSoftPreviousState
,
FieldODEStateAndDerivative<T>
end of the restricted step
newSoftCurrentState
,
FieldEquationsMapper<T>
equations mapper for the all equations
newMapper
)

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

Create a new instance.

protected abstract RungeKuttaFieldStepInterpolator<T>

Returns:

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

Create a new instance.

protected T[]

Returns:

combined state
currentStateLinearCombination
(final T...
coefficients to apply to the method staged derivatives
coefficients
)

Compute a state by linear combination added to current state.

protected T[]

Returns:

combined state
derivativeLinearCombination
(final T...
coefficients to apply to the method staged derivatives
coefficients
)

Compute a state derivative by linear combination.

protected final T[]

Returns:

combined state
previousStateLinearCombination
(final T...
coefficients to apply to the method staged derivatives
coefficients
)

Compute a state by linear combination added to previous state.

Inherited from org.apache.commons.math3.ode.sampling.AbstractFieldStepInterpolator:
computeInterpolatedStateAndDerivativesgetCurrentStategetGlobalCurrentStategetGlobalPreviousStategetInterpolatedStategetPreviousStateisForwardrestrictStep

Field Detail

fieldback to summary
private final Field<T> field

Field to which the time and state vector elements belong.

yDotKback to summary
private final T[][] yDotK

Slopes at the intermediate points.

Constructor Detail

RungeKuttaFieldStepInterpolatorback to summary
protected RungeKuttaFieldStepInterpolator(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

combineback to summary
private T[] combine(final T[] a, final T... coefficients)

Linearly combine arrays.

Parameters
a:T[]

array to add to

coefficients:T[]

coefficients to apply to the method staged derivatives

Returns:T[]

a itself, as a convenience for fluent API

createback to summary
protected RungeKuttaFieldStepInterpolator<T> create(boolean newForward, FieldODEStateAndDerivative<T> newGlobalPreviousState, FieldODEStateAndDerivative<T> newGlobalCurrentState, FieldODEStateAndDerivative<T> newSoftPreviousState, FieldODEStateAndDerivative<T> newSoftCurrentState, FieldEquationsMapper<T> newMapper)

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

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

Create a new instance.

Parameters
newForward:boolean

integration direction indicator

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:RungeKuttaFieldStepInterpolator<T>

a new instance

Annotations
@Override
createback to summary
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<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:RungeKuttaFieldStepInterpolator<T>

a new instance

currentStateLinearCombinationback to summary
protected T[] currentStateLinearCombination(final T... coefficients)

Compute a state by linear combination added to current state.

Parameters
coefficients:T[]

coefficients to apply to the method staged derivatives

Returns:T[]

combined state

derivativeLinearCombinationback to summary
protected T[] derivativeLinearCombination(final T... coefficients)

Compute a state derivative by linear combination.

Parameters
coefficients:T[]

coefficients to apply to the method staged derivatives

Returns:T[]

combined state

previousStateLinearCombinationback to summary
protected final T[] previousStateLinearCombination(final T... coefficients)

Compute a state by linear combination added to previous state.

Parameters
coefficients:T[]

coefficients to apply to the method staged derivatives

Returns:T[]

combined state