secondary equations to
compute the Jacobian matrices with respect to the initial state vector and, if
any, to some parameters of the primary ODE set.
It is intended to be packed into an ExpandableStatefulODE
in conjunction with a primary set of ODE, which may be:
ExpandableStatefulODE, FirstOrderDifferentialEquations, MainStateJacobianProvider, ParameterJacobianProvider, ParameterizedODE
| Modifier and Type | Class and Description |
|---|---|
| private class | JacobianMatrices.
Local implementation of secondary equations. |
| private static class | JacobianMatrices.
Wrapper class to compute jacobian matrices by finite differences for ODE which do not compute them by themselves. |
| public static class | JacobianMatrices.
Special exception for equations mismatch. |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | dirtyParameter
Boolean for selected parameters consistency. |
| private ExpandableStatefulODE | efode
Expandable first order differential equation. |
| private int | index
Index of the instance in the expandable set. |
| private List | jacobianProviders
FODE with exact parameter Jacobian computation skill. |
| private MainStateJacobianProvider | jode
FODE with exact primary Jacobian computation skill. |
| private double[] | matricesData
State and parameters Jacobian matrices in a row. |
| private int | paramDim
Parameters dimension. |
| private ParameterizedODE | pode
FODE without exact parameter Jacobian computation skill. |
| private ParameterConfiguration[] | selectedParameters
Selected parameters for parameter Jacobian computation. |
| private int | stateDim
Main state vector dimension. |
| Access | Constructor and Description |
|---|---|
| public | JacobianMatrices(final FirstOrderDifferentialEquations
the primary first order differential equations set to extend fode, final double[] step used for finite difference computation with respect to state vector hY, final String... parameters to consider for Jacobian matrices processing
(may be null if parameters Jacobians is not desired) parameters)Simple constructor for a secondary equations set computing Jacobian matrices. |
| public | JacobianMatrices(final MainStateJacobianProvider
the primary first order differential equations set to extend jode, final String... parameters to consider for Jacobian matrices processing
(may be null if parameters Jacobians is not desired) parameters)Simple constructor for a secondary equations set computing Jacobian matrices. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addParameterJacobianProvider(final ParameterJacobianProvider
the parameter Jacobian provider to compute exactly the parameter Jacobian matrix provider)Add a parameter Jacobian provider. |
| private void | checkDimension(final int
expected dimension expected, final Object (may be null if expected is 0) array)Check array dimensions. |
| public void | getCurrentMainSetJacobian(final double[][]
current Jacobian matrix with respect to state. dYdY0)Get the current value of the Jacobian matrix with respect to state. |
| public void | getCurrentParameterJacobian(String
name of the parameter for the computed Jacobian matrix pName, final double[] current Jacobian matrix with respect to the named parameter dYdP)Get the current value of the Jacobian matrix with respect to one parameter. |
| public void | registerVariationalEquations(final ExpandableStatefulODE
expandable set into which variational equations should be registered expandable)Register the variational equations for the Jacobians matrices to the expandable set. |
| public void | setInitialMainStateJacobian(final double[][]
initial Jacobian matrix w.r.t. state dYdY0)Set the initial value of the Jacobian matrix with respect to state. |
| public void | setInitialParameterJacobian(final String
parameter name pName, final double[] initial Jacobian column vector with respect to the parameter dYdP)Set the initial value of a column of the Jacobian matrix with respect to one parameter. |
| public void | setParameterizedODE(final ParameterizedODE
the parameterized ODE to compute the parameter Jacobian matrix using finite differences parameterizedOde)Set a parameter Jacobian provider. |
| public void | setParameterStep(final String
parameter to consider for Jacobian processing parameter, final double step for Jacobian finite difference computation w.r.t. the specified parameter hP)Set the step associated to a parameter in order to compute by finite difference the Jacobian matrix. |
| dirtyParameter | back to summary |
|---|---|
| private boolean dirtyParameter Boolean for selected parameters consistency. | |
| efode | back to summary |
|---|---|
| private ExpandableStatefulODE efode Expandable first order differential equation. | |
| index | back to summary |
|---|---|
| private int index Index of the instance in the expandable set. | |
| jacobianProviders | back to summary |
|---|---|
| private List<ParameterJacobianProvider> jacobianProviders FODE with exact parameter Jacobian computation skill. | |
| jode | back to summary |
|---|---|
| private MainStateJacobianProvider jode FODE with exact primary Jacobian computation skill. | |
| matricesData | back to summary |
|---|---|
| private double[] matricesData State and parameters Jacobian matrices in a row. | |
| paramDim | back to summary |
|---|---|
| private int paramDim Parameters dimension. | |
| pode | back to summary |
|---|---|
| private ParameterizedODE pode FODE without exact parameter Jacobian computation skill. | |
| selectedParameters | back to summary |
|---|---|
| private ParameterConfiguration[] selectedParameters Selected parameters for parameter Jacobian computation. | |
| stateDim | back to summary |
|---|---|
| private int stateDim Main state vector dimension. | |
| JacobianMatrices | back to summary |
|---|---|
| public JacobianMatrices(final FirstOrderDifferentialEquations fode, final double[] hY, final String... parameters) throws DimensionMismatchException Simple constructor for a secondary equations set computing Jacobian matrices.
Parameters must belong to the supported ones given by Note that each selection clears the previous selected parameters.
| |
| JacobianMatrices | back to summary |
|---|---|
| public JacobianMatrices(final MainStateJacobianProvider jode, final String... parameters) Simple constructor for a secondary equations set computing Jacobian matrices.
Parameters must belong to the supported ones given by Note that each selection clears the previous selected parameters.
| |
| addParameterJacobianProvider | back to summary |
|---|---|
| public void addParameterJacobianProvider(final ParameterJacobianProvider provider) Add a parameter Jacobian provider.
| |
| checkDimension | back to summary |
|---|---|
| private void checkDimension(final int expected, final Object array) throws DimensionMismatchException Check array dimensions.
| |
| getCurrentMainSetJacobian | back to summary |
|---|---|
| public void getCurrentMainSetJacobian(final double[][] dYdY0) Get the current value of the Jacobian matrix with respect to state.
| |
| getCurrentParameterJacobian | back to summary |
|---|---|
| public void getCurrentParameterJacobian(String pName, final double[] dYdP) Get the current value of the Jacobian matrix with respect to one parameter.
| |
| registerVariationalEquations | back to summary |
|---|---|
| public void registerVariationalEquations(final ExpandableStatefulODE expandable) throws DimensionMismatchException, MismatchedEquations Register the variational equations for the Jacobians matrices to the expandable set.
| |
| setInitialMainStateJacobian | back to summary |
|---|---|
| public void setInitialMainStateJacobian(final double[][] dYdY0) throws DimensionMismatchException Set the initial value of the Jacobian matrix with respect to state. If this method is not called, the initial value of the Jacobian matrix with respect to state is set to identity.
| |
| setInitialParameterJacobian | back to summary |
|---|---|
| public void setInitialParameterJacobian(final String pName, final double[] dYdP) throws UnknownParameterException, DimensionMismatchException Set the initial value of a column of the Jacobian matrix with respect to one parameter. If this method is not called for some parameter, the initial value of the column of the Jacobian matrix with respect to this parameter is set to zero.
| |
| setParameterizedODE | back to summary |
|---|---|
| public void setParameterizedODE(final ParameterizedODE parameterizedOde) Set a parameter Jacobian provider.
| |
| setParameterStep | back to summary |
|---|---|
| public void setParameterStep(final String parameter, final double hP) throws UnknownParameterException Set the step associated to a parameter in order to compute by finite difference the Jacobian matrix.
Needed if and only if the primary ODE set is a
Given a non zero parameter value pval for the parameter, a reasonable value
for such a step is A zero value for such a step doesn't enable to compute the parameter Jacobian matrix.
| |
This class is an inner class to ensure proper scheduling of calls
by forcing the use of JacobianMatrices#registerVariationalEquations(ExpandableStatefulODE).
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | computeDerivatives(final double
current value of the independent time variable t, final double[] array containing the current value of the primary state vector y, final double[] array containing the derivative of the primary state vector yDot, final double[] array containing the current value of the secondary state vector z, final double[] placeholder array where to put the derivative of the secondary state vector zDot)Implements org. Compute the derivatives related to the secondary state parameters. |
| public int | getDimension()
Implements org. Get the dimension of the secondary state parameters. |
| JacobiansSecondaryEquations | back to summary |
|---|---|
| private JacobiansSecondaryEquations() | |
| computeDerivatives | back to summary |
|---|---|
| public void computeDerivatives(final double t, final double[] y, final double[] yDot, final double[] z, final double[] zDot) throws MaxCountExceededException, DimensionMismatchException Implements org. Doc from org. Compute the derivatives related to the secondary state parameters.
| |
| getDimension | back to summary |
|---|---|
| public int getDimension() Implements org. Doc from org. Get the dimension of the secondary state parameters.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final double[] | hY
Steps for finite difference computation of the jacobian df/dy w.r.t. state. |
| private final FirstOrderDifferentialEquations | ode
Raw ODE without jacobians computation skill to be wrapped into a MainStateJacobianProvider. |
| Access | Constructor and Description |
|---|---|
| pack-priv | MainStateJacobianWrapper(final FirstOrderDifferentialEquations
original ODE problem, without jacobians computation skill ode, final double[] step sizes to compute the jacobian df/dy hY)Wrap a |
| Modifier and Type | Method and Description |
|---|---|
| public void | computeDerivatives(double
current value of the independent time variable t, double[] array containing the current value of the state vector y, double[] placeholder array where to put the time derivative of the state vector yDot)Implements org. Get the current time derivative of the state vector. |
| public void | computeMainStateJacobian(double
current value of the independent time variable t, double[] array containing the current value of the main state vector y, double[] array containing the current value of the time derivative of the main state vector yDot, double[][] placeholder array where to put the jacobian matrix of the ODE w.r.t. the main state vector dFdY)Implements org. Compute the jacobian matrix of ODE with respect to main state. |
| public int | getDimension()
Implements org. Get the dimension of the problem. |
| hY | back to summary |
|---|---|
| private final double[] hY Steps for finite difference computation of the jacobian df/dy w.r.t. state. | |
| ode | back to summary |
|---|---|
| private final FirstOrderDifferentialEquations ode Raw ODE without jacobians computation skill to be wrapped into a MainStateJacobianProvider. | |
| MainStateJacobianWrapper | back to summary |
|---|---|
| pack-priv MainStateJacobianWrapper(final FirstOrderDifferentialEquations ode, final double[] hY) throws DimensionMismatchException Wrap a
| |
| computeDerivatives | back to summary |
|---|---|
| public void computeDerivatives(double t, double[] y, double[] yDot) throws MaxCountExceededException, DimensionMismatchException Implements org. Doc from org. Get the current time derivative of the state vector.
| |
| computeMainStateJacobian | back to summary |
|---|---|
| public void computeMainStateJacobian(double t, double[] y, double[] yDot, double[][] dFdY) throws MaxCountExceededException, DimensionMismatchException Implements org. Doc from org. Compute the jacobian matrix of ODE with respect to main state.
| |
| getDimension | back to summary |
|---|---|
| public int getDimension() Implements org. Doc from org. Get the dimension of the problem.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Hides org. |
| Access | Constructor and Description |
|---|---|
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. Serializable UID. | |
| MismatchedEquations | back to summary |
|---|---|
| public MismatchedEquations() Simple constructor. | |