primary
Primary differential equation.
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.
private static class private final FirstOrderDifferentialEquationsprivate final EquationsMapperprivate final double[]private final double[]private doubleintaddSecondaryEquations(SecondaryEquations secondary) voidcomputeDerivatives(double t,
double[] y,
double[] yDot) double[]double[]double[]double[]getSecondaryState(int index) double[]getSecondaryStateDot(int index) doublegetTime()intvoidsetCompleteState(double[] completeState) voidsetPrimaryState(double[] primaryState) voidsetSecondaryState(int index,
double[] secondaryState) voidsetTime(double time) primary - the primary set of differential equations to be integrated.The complete set of equations correspond to the primary set plus all secondary sets.
t - current value of the independent time variabley - array containing the current value of the complete state vectoryDot - placeholder array where to put the time derivative of the complete state vectorMaxCountExceededException - if the number of functions evaluations is exceededDimensionMismatchException - if arrays dimensions do not match equations settingssecondary - secondary equations settime - current timeprimaryState - primary part of the current stateDimensionMismatchException - if the dimension of the array does not
match the primary setindex - index of the part to set as returned by addSecondaryEquations(SecondaryEquations)secondaryState - secondary part of the current stateDimensionMismatchException - if the dimension of the partial state does not
match the selected equations set dimensionindex - index of the part to set as returned by addSecondaryEquations(SecondaryEquations)index - index of the part to set as returned by addSecondaryEquations(SecondaryEquations)completeState - complete current state to copy data fromDimensionMismatchException - if the dimension of the complete state does not
match the complete equations sets dimensionDimensionMismatchException - if the dimension of the complete state does not
match the complete equations sets dimension