philsupertramp/game-math
Loading...
Searching...
No Matches
ODESolver.h
Go to the documentation of this file.
1
10#pragma once
11
12#include "../../Matrix.h"
13#include "ExplicitEuler.h"
14#include "ode.h"
15#include "ode45.h"
16#include "odeBDF2.h"
17#include "odeTrapez.h"
18
24{
25public:
34 static ODEResult
35 odeExpEuler(const ODE& fun, const std::vector<double>& tInterval, const Matrix<double>& y0, const ODEOption& option) {
36 return ODEExpEuler(fun, tInterval, y0, option.h);
37 }
46 static ODEResult
47 ode45(const ODE& fun, const std::vector<double>& tInterval, const Matrix<double>& y0, const ODEOption& option) {
48 return ODE45(fun, tInterval, y0, option.h);
49 }
58 static ODEResult
59 odeTrapez(const ODE& fun, const std::vector<double>& tInterval, const Matrix<double>& y0, const ODEOption& option) {
60 return ODETrapez(fun, tInterval, y0, option);
61 }
70 static ODEResult
71 odeBDF2(const ODE& fun, const std::vector<double>& tInterval, const Matrix<double>& y0, const ODEOption& option) {
72 return ODEBDF2(fun, tInterval, y0, option);
73 }
74};
ODEResult ODEExpEuler(const ODE &fun, const std::vector< double > &tInterval, const Matrix< double > &y0, double h=0.0)
Definition: ExplicitEuler.h:26
Definition: Matrix.h:42
Definition: ODESolver.h:24
static ODEResult odeExpEuler(const ODE &fun, const std::vector< double > &tInterval, const Matrix< double > &y0, const ODEOption &option)
Definition: ODESolver.h:35
static ODEResult ode45(const ODE &fun, const std::vector< double > &tInterval, const Matrix< double > &y0, const ODEOption &option)
Definition: ODESolver.h:47
static ODEResult odeBDF2(const ODE &fun, const std::vector< double > &tInterval, const Matrix< double > &y0, const ODEOption &option)
Definition: ODESolver.h:71
static ODEResult odeTrapez(const ODE &fun, const std::vector< double > &tInterval, const Matrix< double > &y0, const ODEOption &option)
Definition: ODESolver.h:59
ODEResult ODE45(const ODE &fun, const std::vector< double > &tInterval, const Matrix< double > &y0, double h=0.0)
Definition: ode45.h:35
ODEResult ODEBDF2(const ODE &fun, const std::vector< double > &tInterval, const Matrix< double > &y0, const ODEOption &option)
Definition: odeBDF2.h:30
ODEResult ODETrapez(const ODE &fun, const std::vector< double > &tInterval, const Matrix< double > &y0, const ODEOption &option)
Definition: odeTrapez.h:28
std::function< Matrix< double >(double, Matrix< double >)> ODE
alias for ODE
Definition: ode.h:17
Definition: ode.h:56
double h
step width of t
Definition: ode.h:58
Definition: ode.h:25