One typical use case is the computation of the Jacobian matrix for some ODE. In this case, the primary set of equations corresponds to the raw ODE, and we add to this set another bunch of secondary equations which represent the Jacobian matrix of the primary set.
We want the integrator to use only the primary set to estimate the
errors and hence the step sizes. It should not use the secondary
equations in this computation. The integrator will
be able to know where the primary set ends and so where the secondary sets begin.
FirstOrderFieldDifferentialEquations, FieldSecondaryEquations
| Modifier and Type | Field and Description |
|---|---|
| private List | components
Components of the expandable ODE. |
| private FieldEquationsMapper | mapper
Mapper for all equations. |
| private final FirstOrderFieldDifferentialEquations | primary
Primary differential equation. |
| Access | Constructor and Description |
|---|---|
| public | FieldExpandableODE(final FirstOrderFieldDifferentialEquations<T>
the primary set of differential equations to be integrated. primary)Build an expandable set from its primary ODE set. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: index of the secondary equation in the expanded state, to be used as the parameter toFieldODEState#getSecondaryState(int) and
FieldODEStateAndDerivative#getSecondaryDerivative(int) (beware index
0 corresponds to main state, additional states start at 1)secondary equations set secondary)Add a set of secondary equations to be integrated along with the primary set. |
| public T[] | Returns: time derivative of the complete state vectorcurrent value of the independent time variable t, final T[] array containing the current value of the complete state vector y)Get the current time derivative of the complete state vector. |
| public FieldEquationsMapper | |
| public void | init(final T
value of the independent time variable at integration start t0, final T[] array containing the value of the state vector at integration start y0, final T target time for the integration finalTime)Initialize equations at the start of an ODE integration. |
| components | back to summary |
|---|---|
| private List<FieldSecondaryEquations<T>> components Components of the expandable ODE. | |
| mapper | back to summary |
|---|---|
| private FieldEquationsMapper<T> mapper Mapper for all equations. | |
| primary | back to summary |
|---|---|
| private final FirstOrderFieldDifferentialEquations<T> primary Primary differential equation. | |
| FieldExpandableODE | back to summary |
|---|---|
| public FieldExpandableODE(final FirstOrderFieldDifferentialEquations<T> primary) Build an expandable set from its primary ODE set.
| |
| addSecondaryEquations | back to summary |
|---|---|
| public int addSecondaryEquations(final FieldSecondaryEquations<T> secondary) Add a set of secondary equations to be integrated along with the primary set.
| |
| computeDerivatives | back to summary |
|---|---|
| public T[] computeDerivatives(final T t, final T[] y) throws MaxCountExceededException, DimensionMismatchException Get the current time derivative of the complete state vector.
| |
| getMapper | back to summary |
|---|---|
| public FieldEquationsMapper Get the mapper for the set of equations.
| |
| init | back to summary |
|---|---|
| public void init(final T t0, final T[] y0, final T finalTime) Initialize equations at the start of an ODE integration.
| |