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

public Interface FieldSecondaryEquations<T extends RealFieldElement<T>>

Type Parameters
<T>
the type of the field elements
Imports
org.apache.commons.math3.RealFieldElement, org.apache.commons.math3.exception.DimensionMismatchException, .MaxCountExceededException

This interface allows users to add secondary differential equations to a primary set of differential equations.

In some cases users may need to integrate some problem-specific equations along with a primary set of differential equations. One example is optimal control where adjoined parameters linked to the minimized Hamiltonian must be integrated.

This interface allows users to add such equations to a primary set of first order differential equations thanks to the FieldExpandableODE#addSecondaryEquations(FieldSecondaryEquations) method.

Since
3.6
See Also
FirstOrderFieldDifferentialEquations, FieldExpandableODE

Method Summary

Modifier and TypeMethod and Description
public T[]

Returns:

derivative of the secondary state vector
computeDerivatives
(T
current value of the independent time variable
t
,
T[]
array containing the current value of the primary state vector
primary
,
T[]
array containing the derivative of the primary state vector
primaryDot
,
T[]
array containing the current value of the secondary state vector
secondary
)

Compute the derivatives related to the secondary state parameters.

public int

Returns:

dimension of the secondary state parameters
getDimension
()

Get the dimension of the secondary state parameters.

public void
init(T
value of the independent time variable at integration start
t0
,
T[]
array containing the value of the primary state vector at integration start
primary0
,
T[]
array containing the value of the secondary state vector at integration start
secondary0
,
T
target time for the integration
finalTime
)

Initialize equations at the start of an ODE integration.

Method Detail

computeDerivativesback to summary
public T[] computeDerivatives(T t, T[] primary, T[] primaryDot, T[] secondary) throws MaxCountExceededException, DimensionMismatchException

Compute the derivatives related to the secondary state parameters.

Parameters
t:T

current value of the independent time variable

primary:T[]

array containing the current value of the primary state vector

primaryDot:T[]

array containing the derivative of the primary state vector

secondary:T[]

array containing the current value of the secondary state vector

Returns:T[]

derivative of the secondary state vector

Exceptions
MaxCountExceededException:
if the number of functions evaluations is exceeded
DimensionMismatchException:
if arrays dimensions do not match equations settings
getDimensionback to summary
public int getDimension()

Get the dimension of the secondary state parameters.

Returns:int

dimension of the secondary state parameters

initback to summary
public void init(T t0, T[] primary0, T[] secondary0, T finalTime)

Initialize equations at the start of an ODE integration.

This method is called once at the start of the integration. It may be used by the equations to initialize some internal data if needed.

Parameters
t0:T

value of the independent time variable at integration start

primary0:T[]

array containing the value of the primary state vector at integration start

secondary0:T[]

array containing the value of the secondary state vector at integration start

finalTime:T

target time for the integration