Class ParameterJacobianWrapper
java.lang.Object
org.apache.commons.math3.ode.ParameterJacobianWrapper
- All Implemented Interfaces:
Parameterizable, ParameterJacobianProvider
Wrapper class to compute Jacobian matrices by finite differences for ODE
which do not compute them by themselves.
- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FirstOrderDifferentialEquationsMain ODE set.Steps for finite difference computation of the Jacobian df/dp w.r.t.private final ParameterizedODERaw ODE without Jacobian computation skill to be wrapped into a ParameterJacobianProvider. -
Constructor Summary
ConstructorsConstructorDescriptionParameterJacobianWrapper(FirstOrderDifferentialEquations fode, ParameterizedODE pode, ParameterConfiguration[] paramsAndSteps) Wrap aParameterizedODEinto aParameterJacobianProvider. -
Method Summary
Modifier and TypeMethodDescriptionvoidcomputeParameterJacobian(double t, double[] y, double[] yDot, String paramName, double[] dFdP) Compute the Jacobian matrix of ODE with respect to one parameter.Get the names of the supported parameters.booleanisSupported(String name) Check if a parameter is supported.
-
Field Details
-
fode
Main ODE set. -
pode
Raw ODE without Jacobian computation skill to be wrapped into a ParameterJacobianProvider. -
hParam
-
-
Constructor Details
-
ParameterJacobianWrapper
ParameterJacobianWrapper(FirstOrderDifferentialEquations fode, ParameterizedODE pode, ParameterConfiguration[] paramsAndSteps) Wrap aParameterizedODEinto aParameterJacobianProvider.- Parameters:
fode- main first order differential equations setpode- secondary problem, without parameter Jacobian computation skillparamsAndSteps- parameters and steps to compute the Jacobians df/dp- See Also:
-
-
Method Details
-
getParametersNames
Get the names of the supported parameters.- Specified by:
getParametersNamesin interfaceParameterizable- Returns:
- parameters names
- See Also:
-
isSupported
Check if a parameter is supported.Supported parameters are those listed by
Parameterizable.getParametersNames().- Specified by:
isSupportedin interfaceParameterizable- Parameters:
name- parameter name to check- Returns:
- true if the parameter is supported
- See Also:
-
computeParameterJacobian
public void computeParameterJacobian(double t, double[] y, double[] yDot, String paramName, double[] dFdP) throws DimensionMismatchException, MaxCountExceededException Compute the Jacobian matrix of ODE with respect to one parameter.If the parameter does not belong to the collection returned by
Parameterizable.getParametersNames(), the Jacobian will be set to 0, but no errors will be triggered.- Specified by:
computeParameterJacobianin interfaceParameterJacobianProvider- Parameters:
t- current value of the independent time variabley- array containing the current value of the main state vectoryDot- array containing the current value of the time derivative of the main state vectorparamName- name of the parameter to considerdFdP- placeholder array where to put the Jacobian matrix of the ODE with respect to the parameter- Throws:
DimensionMismatchException- if arrays dimensions do not match equations settingsMaxCountExceededException- if the number of functions evaluations is exceeded
-