 | RungeKutta45OdeSolverSolve(FuncDouble, Double, Double, DoubleVector, Double, RungeKutta45OdeSolverOptions) Method |
Solves the given initial value problem of ordinary differential equation
of the form
y' = f(t,y)
or
y' = M(t,y)*f(t,y)
for problems that involve a mass matrix M.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntaxpublic RungeKutta45OdeSolverSolution<DoubleVector> Solve(
Func<double, double, double> odeFunction,
DoubleVector timeSpan,
double y0,
RungeKutta45OdeSolverOptions solverOptions
)
Public Function Solve (
odeFunction As Func(Of Double, Double, Double),
timeSpan As DoubleVector,
y0 As Double,
solverOptions As RungeKutta45OdeSolverOptions
) As RungeKutta45OdeSolverSolution(Of DoubleVector)
public:
RungeKutta45OdeSolverSolution<DoubleVector^>^ Solve(
Func<double, double, double>^ odeFunction,
DoubleVector^ timeSpan,
double y0,
RungeKutta45OdeSolverOptions^ solverOptions
)
member Solve :
odeFunction : Func<float, float, float> *
timeSpan : DoubleVector *
y0 : float *
solverOptions : RungeKutta45OdeSolverOptions -> RungeKutta45OdeSolverSolution<DoubleVector>
Parameters
- odeFunction FuncDouble, Double, Double
- A delegate which evaluates the right hand side of the
differential equations.
- timeSpan DoubleVector
- A vector specifying the interval if integration [t0, tf].
The solver imposes intitial conditions at t0 and integrates from t0 to tf
If the timeSpan vector contains two elements, the solver returns the solution
evaluated at every integration step. If the timeSpan vector contains more than
two points the solver returns the solution evaluated at the given points. The
time values must be in order, either increasing or decreasing.
- y0 Double
- Initial value for problem. It is the value of the unknown function
y at the initial time value timeSpan[0].
- solverOptions RungeKutta45OdeSolverOptions
- User settable options used while solviong.
Return Value
RungeKutta45OdeSolverSolutionDoubleVectorThe solution as a key-value pair. The
Key value is a vector of time values,
and the
Value is a vector of state values. The ith value of the
Value
vector is the state corresponding to the ith time value in the
Key
vector.
See Also