philsupertramp/game-math
Loading...
Searching...
No Matches
Functions
ode45.h File Reference
#include "../utils.h"
#include "ode.h"
#include <functional>
#include <vector>

Go to the source code of this file.

Functions

ODEResult ODE45 (const ODE &fun, const std::vector< double > &tInterval, const Matrix< double > &y0, double h=0.0)
 

Detailed Description

ODE Solver implementation based on Dormand-Prince Method to solve ordinary differential equations https://en.wikipedia.org/wiki/Dormand%E2%80%93Prince_method

Current state:

TODO: use calculated error of 5th order - 4th order to alter step width h dynamically to fully implement dp-method.

Requires:

Function Documentation

◆ ODE45()

ODEResult ODE45 ( const ODE fun,
const std::vector< double > &  tInterval,
const Matrix< double > &  y0,
double  h = 0.0 
)

Implementation of 5th order Runge-Kutta-Method

Parameters
funode to approximate
tIntervalinterval to perform approximation on
y0start value
hstep width for time values
Returns
approximated values
Examples
numerics/ode/TestODE45.cpp.