 | RungeKutta45OdeSolverSolve(FuncDouble, DoubleVector, DoubleVector, DoubleVector, DoubleVector, RungeKutta45OdeSolverOptions) Method |
Solves initial value problem of ordinary differential equations. This function
solves of equations of the form
y' = f(t,y). If the equations
involve a mass matrix, either constant of time and state dependent, it must
be specified using the solverOptions parameter. The mass matrix
must be nonsigular.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntaxpublic RungeKutta45OdeSolverSolution<DoubleMatrix> Solve(
Func<double, DoubleVector, DoubleVector> odeFunction,
DoubleVector timeSpan,
DoubleVector y0,
RungeKutta45OdeSolverOptions solverOptions
)
Public Function Solve (
odeFunction As Func(Of Double, DoubleVector, DoubleVector),
timeSpan As DoubleVector,
y0 As DoubleVector,
solverOptions As RungeKutta45OdeSolverOptions
) As RungeKutta45OdeSolverSolution(Of DoubleMatrix)
public:
RungeKutta45OdeSolverSolution<DoubleMatrix^>^ Solve(
Func<double, DoubleVector^, DoubleVector^>^ odeFunction,
DoubleVector^ timeSpan,
DoubleVector^ y0,
RungeKutta45OdeSolverOptions^ solverOptions
)
member Solve :
odeFunction : Func<float, DoubleVector, DoubleVector> *
timeSpan : DoubleVector *
y0 : DoubleVector *
solverOptions : RungeKutta45OdeSolverOptions -> RungeKutta45OdeSolverSolution<DoubleMatrix>
Parameters
- odeFunction FuncDouble, DoubleVector, DoubleVector
- A delegate which evaluates the right hand side of the
differential equations.
- timeSpan DoubleVector
- A vector specifying the interval if integration [t0, tf].
- y0 DoubleVector
- Initial value for problem. It is the value of the unknown function
y at the initial time value timeSpan[0].
- solverOptions RungeKutta45OdeSolverOptions
- Solver options.
Return Value
RungeKutta45OdeSolverSolutionDoubleMatrixThe solution as a key-value pair. The
Key value is a vector of time values,
and the
Value is a matrix of state values. The ith row of the
Value
matrix is the state vector corresponding to the ith time value in the
Key
vector.
See Also