15 #include <dpsim-models/Solver/ODEintInterface.h>
16 #include <dpsim-models/SystemTopology.h>
17 #include <dpsim/Solver.h>
19 #include <boost/numeric/odeint/integrate/integrate_const.hpp>
20 #include <boost/numeric/odeint/stepper/runge_kutta4.hpp>
34 boost::numeric::odeint::runge_kutta4<std::vector<Real>>
stepper;
40 std::vector<CPS::ODEintInterface::stateFnc>
system;
46 static void StateSpaceWrapper(
const std::vector<double> &y,
47 std::vector<double> ydot,
double t);
53 ODEintSolver(String name, CPS::ODEintInterface::Ptr comp, Real dt, Real t0);
Solver class which uses ODE systems.
std::vector< CPS::ODEintInterface::stateFnc > system
ODE of Component.
std::vector< Real > times
Vector containing all timesteps.
ODEintSolver(String name, CPS::ODEintInterface::Ptr comp, Real dt, Real t0)
Create solve object with given parameters.
boost::numeric::odeint::runge_kutta4< std::vector< Real > > stepper
Stepper needed by ODEint.
Real mTimestep
Constant time step.
Real step(Real time)
Solve system for the current time.
std::vector< std::vector< Real > > solution
Vector containing the solution at every timestep.
~ODEintSolver()
Deallocate all memory.
std::vector< Real > curSolution
Current solution vector.
CPS::ODEintInterface::Ptr mComponent
Pointer to current Component.
Base class for more specific solvers such as MNA, ODE or IDA.