T
- the type of the field elementspublic class FieldExpandableODE<T extends CalculusFieldElement<T>> extends Object
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.
Constructor and Description |
---|
FieldExpandableODE(FieldOrdinaryDifferentialEquation<T> primary)
Build an expandable set from its primary ODE set.
|
Modifier and Type | Method and Description |
---|---|
int |
addSecondaryEquations(FieldSecondaryODE<T> secondary)
Add a set of secondary equations to be integrated along with the primary set.
|
T[] |
computeDerivatives(T t,
T[] y)
Get the current time derivative of the complete state vector.
|
FieldEquationsMapper<T> |
getMapper()
Get the mapper for the set of equations.
|
FieldOrdinaryDifferentialEquation<T> |
getPrimary()
Get the primary set of differential equations to be integrated.
|
void |
init(FieldODEState<T> s0,
T finalTime)
Initialize equations at the start of an ODE integration.
|
public FieldExpandableODE(FieldOrdinaryDifferentialEquation<T> primary)
primary
- the primary set of differential equations to be integrated.public FieldOrdinaryDifferentialEquation<T> getPrimary()
public FieldEquationsMapper<T> getMapper()
public int addSecondaryEquations(FieldSecondaryODE<T> secondary)
secondary
- secondary equations setFieldODEState.getSecondaryState(int)
and
FieldODEStateAndDerivative.getSecondaryDerivative(int)
(beware index
0 corresponds to primary state, secondary states start at 1)public void init(FieldODEState<T> s0, T finalTime)
s0
- state at integration startfinalTime
- target time for the integrationMathIllegalStateException
- if the number of functions evaluations is exceededMathIllegalArgumentException
- if arrays dimensions do not match equations settingspublic T[] computeDerivatives(T t, T[] y) throws MathIllegalArgumentException, MathIllegalStateException
t
- current value of the independent time variabley
- array containing the current value of the complete state vectorMathIllegalStateException
- if the number of functions evaluations is exceededMathIllegalArgumentException
- if arrays dimensions do not match equations settingsCopyright © 2016-2022 CS GROUP. All rights reserved.