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

public Interface SecondaryEquations

Known Direct Implementers
org.apache.commons.math3.ode.JacobianMatrices.JacobiansSecondaryEquations
Imports
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 ExpandableStatefulODE#addSecondaryEquations(SecondaryEquations) method.

Since
3.0
See Also
ExpandableStatefulODE

Method Summary

Modifier and TypeMethod and Description
public void
computeDerivatives(double
current value of the independent time variable
t
,
double[]
array containing the current value of the primary state vector
primary
,
double[]
array containing the derivative of the primary state vector
primaryDot
,
double[]
array containing the current value of the secondary state vector
secondary
,
double[]
placeholder array where to put the derivative of the secondary state vector
secondaryDot
)

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.

Method Detail

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

Compute the derivatives related to the secondary state parameters.

Parameters
t:double

current value of the independent time variable

primary:double[]

array containing the current value of the primary state vector

primaryDot:double[]

array containing the derivative of the primary state vector

secondary:double[]

array containing the current value of the secondary state vector

secondaryDot:double[]

placeholder array where to put the 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