11 #include <dpsim-models/AttributeList.h>
12 #include <dpsim-models/Definitions.h>
18 using Ptr = std::shared_ptr<ODEInterface>;
21 const CPS::AttributeList::Ptr mAttributeList;
27 using StSpFn = std::function<void(
double,
const double *,
double *)>;
29 using JacFn = std::function<void(
double,
const double *,
double *,
double *,
30 double *,
double *,
double *)>;
34 virtual void odeStateSpace(
double t,
const double y[],
double ydot[]) = 0;
37 virtual void odeJacobian(
double t,
const double y[],
double fy[],
double J[],
38 double tmp1[],
double tmp2[],
double tmp3[]) = 0;
42 : mAttributeList(attrList),
43 mOdePreState(attrList->create<Matrix>(
"ode_pre_state")),
44 mOdePostState(attrList->create<Matrix>(
"ode_post_state")) {}
virtual void odeStateSpace(double t, const double y[], double ydot[])=0
State Space Equation System for ODE Solver.
std::function< void(double, const double *, double *)> StSpFn
Use this to pass the individual components StateSpace implementation to the ODESolver class.
virtual void odeJacobian(double t, const double y[], double fy[], double J[], double tmp1[], double tmp2[], double tmp3[])=0
Jacobian Matrix (of State Space System) needed for implicit solve.