Class xlifepp::OdeSolverTP#
-
template<class T, class P>
class OdeSolverTP : public xlifepp::OdeSolverT<T>#
-
Class for ODE solvers where function f depends on parameters.
OdeSolverTP is a child class of OdeSolverT, managing functions depending on one or several parameters. It stores the function f(t, y, params) that defines the ODE, the initial and final times, the time step, the initial state, and parameters for the function f. It also provides methods to access the computed states and times, and to save the results to a file.
- Template Parameters:
-
T – type of the state (real_t, complex_t, Vector<real_t>, Vector<complex_t>, …)
P – type of the parameter object (can be a collection of parameters)
- Param fwp:
-
function of the ODE y’=f(t,y) with prototype T& f(real_t t, const T& y, T& fty, P& params)
- Param params:
-
parameters for the function fwp (default is nullptr)
Note
This class is not meant to be used directly, but as a base class for specific ODE solvers like EulerTP, RK4TP, and Ode45TP.
Subclassed by xlifepp::EulerTP< T, P >, xlifepp::Ode45TP< T, P >, xlifepp::RK4TP< T, P >