Interface OrdinaryDifferentialEquation
-
- All Known Subinterfaces:
FirstOrderDifferentialEquations
,MainStateJacobianProvider
,ODEJacobiansProvider
- All Known Implementing Classes:
FirstOrderConverter
public interface OrdinaryDifferentialEquation
This interface represents a first order differential equations set.This interface should be implemented by all real first order differential equation problems before they can be handled by the integrators
ODEIntegrator.integrate(OrdinaryDifferentialEquation, ODEState, double)
method.A first order differential equations problem, as seen by an integrator is the time derivative
dY/dt
of a state vectorY
, both being one dimensional arrays. From the integrator point of view, this derivative depends only on the current timet
and on the state vectorY
.For real problems, the derivative depends also on parameters that do not belong to the state vector (dynamical model constants for example). These constants are completely outside of the scope of this interface, the classes that implement it are allowed to handle them as they want.
- See Also:
ODEIntegrator
,FirstOrderConverter
,SecondOrderODE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description double[]
computeDerivatives(double t, double[] y)
Get the current time derivative of the state vector.int
getDimension()
Get the dimension of the problem.default void
init(double t0, double[] y0, double finalTime)
Initialize equations at the start of an ODE integration.
-
-
-
Method Detail
-
getDimension
int getDimension()
Get the dimension of the problem.- Returns:
- dimension of the problem
-
init
default void init(double t0, double[] y0, double finalTime)
Initialize equations at the start of an ODE integration.This method is called once at the start of the integration. It may be used by the equations to initialize some internal data if needed.
The default implementation does nothing.
- Parameters:
t0
- value of the independent time variable at integration starty0
- array containing the value of the state vector at integration startfinalTime
- target time for the integration
-
computeDerivatives
double[] computeDerivatives(double t, double[] y)
Get the current time derivative of the state vector.- Parameters:
t
- current value of the independent time variabley
- array containing the current value of the state vector- Returns:
- time derivative of the state vector
-
-