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

public abstract Class AdamsFieldIntegrator<T extends RealFieldElement<T>>

extends MultistepFieldIntegrator<T extends RealFieldElement<T>>
Class Inheritance
Known Direct Subclasses
org.apache.commons.math3.ode.nonstiff.AdamsMoultonFieldIntegrator, org.apache.commons.math3.ode.nonstiff.AdamsBashforthFieldIntegrator
Type Parameters
<T>
the type of the field elements
Imports
org.apache.commons.math3.Field, .RealFieldElement, org.apache.commons.math3.exception.DimensionMismatchException, .MaxCountExceededException, .NoBracketingException, .NumberIsTooSmallException, org.apache.commons.math3.linear.Array2DRowFieldMatrix, org.apache.commons.math3.ode.FieldExpandableODE, .FieldODEState, .FieldODEStateAndDerivative, .MultistepFieldIntegrator

Base class for Adams-Bashforth and Adams-Moulton integrators.
Since
3.6

Field Summary

Modifier and TypeField and Description
private final AdamsNordsieckFieldTransformer<T>
transformer

Transformer.

Inherited from org.apache.commons.math3.ode.MultistepFieldIntegrator:
nordsieckscaled

Constructor Summary

AccessConstructor and Description
public
AdamsFieldIntegrator(final Field<T>
field to which the time and state vector elements belong
field
,
final String
name of the method
name
,
final int
number of steps of the method excluding the one being computed
nSteps
,
final int
order of the method
order
,
final double
minimal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this
minStep
,
final double
maximal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this
maxStep
,
final double
allowed absolute error
scalAbsoluteTolerance
,
final double
allowed relative error
scalRelativeTolerance
)

Build an Adams integrator with the given order and step control parameters.

public
AdamsFieldIntegrator(final Field<T>
field to which the time and state vector elements belong
field
,
final String
name of the method
name
,
final int
number of steps of the method excluding the one being computed
nSteps
,
final int
order of the method
order
,
final double
minimal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this
minStep
,
final double
maximal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this
maxStep
,
final double[]
allowed absolute error
vecAbsoluteTolerance
,
final double[]
allowed relative error
vecRelativeTolerance
)

Build an Adams integrator with the given order and step control parameters.

Method Summary

Modifier and TypeMethod and Description
protected Array2DRowFieldMatrix<T>
initializeHighOrderDerivatives(final T
step size to use for scaling
h
,
final T[]
first steps times
t
,
final T[][]
first steps states
y
,
final T[][]
first steps derivatives
yDot
)

Implements abstract org.apache.commons.math3.ode.MultistepFieldIntegrator.initializeHighOrderDerivatives.

Initialize the high order scaled derivatives at step start.

public abstract FieldODEStateAndDerivative<T>
integrate(final FieldExpandableODE<T>
differential equations to integrate
equations
,
final FieldODEState<T>
initial state (time, primary and secondary state vectors)
initialState
,
final T
target time for the integration (can be set to a value smaller than t0 for backward integration)
finalTime
)

Redeclares org.apache.commons.math3.ode.FirstOrderFieldIntegrator.integrate.

Integrate the differential equations up to the given time.

public Array2DRowFieldMatrix<T>

Returns:

updated high order derivatives
updateHighOrderDerivativesPhase1
(final Array2DRowFieldMatrix<T>
high order scaled derivatives (h2/2 y'', ... hk/k! y(k))
highOrder
)

Update the high order scaled derivatives for Adams integrators (phase 1).

public void
updateHighOrderDerivativesPhase2(final T[]
first order scaled derivatives at step start
start
,
final T[]
first order scaled derivatives at step end
end
,
final Array2DRowFieldMatrix<T>
high order scaled derivatives, will be modified (h2/2 y'', ... hk/k! y(k))
highOrder
)

Update the high order scaled derivatives Adams integrators (phase 2).

Inherited from org.apache.commons.math3.ode.MultistepFieldIntegrator:
computeStepGrowShrinkFactorgetMaxGrowthgetMinReductiongetNStepsgetSafetygetStarterIntegratorrescalesetMaxGrowthsetMinReductionsetSafetysetStarterIntegratorstart

Field Detail

transformerback to summary
private final AdamsNordsieckFieldTransformer<T> transformer

Transformer.

Constructor Detail

AdamsFieldIntegratorback to summary
public AdamsFieldIntegrator(final Field<T> field, final String name, final int nSteps, final int order, final double minStep, final double maxStep, final double scalAbsoluteTolerance, final double scalRelativeTolerance) throws NumberIsTooSmallException

Build an Adams integrator with the given order and step control parameters.

Parameters
field:Field<T>

field to which the time and state vector elements belong

name:String

name of the method

nSteps:int

number of steps of the method excluding the one being computed

order:int

order of the method

minStep:double

minimal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this

maxStep:double

maximal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this

scalAbsoluteTolerance:double

allowed absolute error

scalRelativeTolerance:double

allowed relative error

Exceptions
NumberIsTooSmallException:
if order is 1 or less
AdamsFieldIntegratorback to summary
public AdamsFieldIntegrator(final Field<T> field, final String name, final int nSteps, final int order, final double minStep, final double maxStep, final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance) throws IllegalArgumentException

Build an Adams integrator with the given order and step control parameters.

Parameters
field:Field<T>

field to which the time and state vector elements belong

name:String

name of the method

nSteps:int

number of steps of the method excluding the one being computed

order:int

order of the method

minStep:double

minimal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this

maxStep:double

maximal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this

vecAbsoluteTolerance:double[]

allowed absolute error

vecRelativeTolerance:double[]

allowed relative error

Exceptions
IllegalArgumentException:
if order is 1 or less

Method Detail

initializeHighOrderDerivativesback to summary
protected Array2DRowFieldMatrix<T> initializeHighOrderDerivatives(final T h, final T[] t, final T[][] y, final T[][] yDot)

Implements abstract org.apache.commons.math3.ode.MultistepFieldIntegrator.initializeHighOrderDerivatives.

Doc from org.apache.commons.math3.ode.MultistepFieldIntegrator.initializeHighOrderDerivatives.

Initialize the high order scaled derivatives at step start.

Parameters
h:T

step size to use for scaling

t:T[]

first steps times

y:T[][]

first steps states

yDot:T[][]

first steps derivatives

Returns:Array2DRowFieldMatrix<T>

Nordieck vector at first step (h2/2 y''n, h3/6 y'''n ... hk/k! y(k)n)

Annotations
@Override
integrateback to summary
public abstract FieldODEStateAndDerivative<T> integrate(final FieldExpandableODE<T> equations, final FieldODEState<T> initialState, final T finalTime) throws NumberIsTooSmallException, DimensionMismatchException, MaxCountExceededException, NoBracketingException

Redeclares org.apache.commons.math3.ode.FirstOrderFieldIntegrator.integrate.

Doc from org.apache.commons.math3.ode.FirstOrderFieldIntegrator.integrate.

Integrate the differential equations up to the given time.

This method solves an Initial Value Problem (IVP).

Since this method stores some internal state variables made available in its public interface during integration (getCurrentSignedStepsize()), it is not thread-safe.

Parameters
equations:FieldExpandableODE<T>

differential equations to integrate

initialState:FieldODEState<T>

initial state (time, primary and secondary state vectors)

finalTime:T

target time for the integration (can be set to a value smaller than t0 for backward integration)

Returns:FieldODEStateAndDerivative<T>

final state, its time will be the same as finalTime if integration reached its target, but may be different if some org.apache.commons.math3.ode.events.FieldEventHandler stops it at some point.

Exceptions
NumberIsTooSmallException:
if integration step is too small
MaxCountExceededException:
if the number of functions evaluations is exceeded
NoBracketingException:
if the location of an event cannot be bracketed
updateHighOrderDerivativesPhase1back to summary
public Array2DRowFieldMatrix<T> updateHighOrderDerivativesPhase1(final Array2DRowFieldMatrix<T> highOrder)

Update the high order scaled derivatives for Adams integrators (phase 1).

The complete update of high order derivatives has a form similar to:

rn+1 = (s1(n) - s1(n+1)) P-1 u + P-1 A P rn
this method computes the P-1 A P rn part.

Parameters
highOrder:Array2DRowFieldMatrix<T>

high order scaled derivatives (h2/2 y'', ... hk/k! y(k))

Returns:Array2DRowFieldMatrix<T>

updated high order derivatives

See Also
updateHighOrderDerivativesPhase2(RealFieldElement[], RealFieldElement[], Array2DRowFieldMatrix)
updateHighOrderDerivativesPhase2back to summary
public void updateHighOrderDerivativesPhase2(final T[] start, final T[] end, final Array2DRowFieldMatrix<T> highOrder)

Update the high order scaled derivatives Adams integrators (phase 2).

The complete update of high order derivatives has a form similar to:

rn+1 = (s1(n) - s1(n+1)) P-1 u + P-1 A P rn
this method computes the (s1(n) - s1(n+1)) P-1 u part.

Phase 1 of the update must already have been performed.

Parameters
start:T[]

first order scaled derivatives at step start

end:T[]

first order scaled derivatives at step end

highOrder:Array2DRowFieldMatrix<T>

high order scaled derivatives, will be modified (h2/2 y'', ... hk/k! y(k))

See Also
updateHighOrderDerivativesPhase1(Array2DRowFieldMatrix)