Solver class for ODE (Ordinary Differential Equation) systems.
More...
#include <ODESolver.h>
|
int | StateSpace (realtype t, N_Vector y, N_Vector ydot) |
|
int | Jacobian (realtype t, N_Vector y, N_Vector fy, SUNMatrix J, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) |
|
int | check_flag (void *flagvalue, const std::string &funcname, int opt) |
| ARKode- standard error detection function; in DAE-solver not detection function is used -> for efficiency purposes?
|
|
|
static int | StateSpaceWrapper (realtype t, N_Vector y, N_Vector ydot, void *user_data) |
| Use wrappers similar to DAE_Solver.
|
|
static int | JacobianWrapper (realtype t, N_Vector y, N_Vector fy, SUNMatrix J, void *user_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) |
|
|
enum | Behaviour { Initialization
, Simulation
} |
|
enum class | Type { MNA
, DAE
, NRP
} |
|
typedef std::shared_ptr< Solver > | Ptr |
|
typedef std::vector< Ptr > | List |
|
int | mMaxIterations = 10 |
|
Solver class for ODE (Ordinary Differential Equation) systems.
Definition at line 25 of file ODESolver.h.
◆ ODESolver()
ODESolver::ODESolver |
( |
String | name, |
|
|
const CPS::ODEInterface::Ptr & | comp, |
|
|
bool | implicit_integration, |
|
|
Real | timestep ) |
Create solve object with corresponding component and information on the integration type.
Definition at line 14 of file ODESolver.cpp.
◆ ~ODESolver()
ODESolver::~ODESolver |
( |
| ) |
|
◆ check_flag()
int ODESolver::check_flag |
( |
void * | flagvalue, |
|
|
const std::string & | funcname, |
|
|
int | opt ) |
|
protected |
ARKode- standard error detection function; in DAE-solver not detection function is used -> for efficiency purposes?
Definition at line 165 of file ODESolver.cpp.
◆ getTasks()
virtual CPS::Task::List DPsim::ODESolver::getTasks |
( |
| ) |
|
|
inlinevirtual |
◆ initialize()
void ODESolver::initialize |
( |
| ) |
|
|
virtual |
◆ Jacobian()
int ODESolver::Jacobian |
( |
realtype | t, |
|
|
N_Vector | y, |
|
|
N_Vector | fy, |
|
|
SUNMatrix | J, |
|
|
N_Vector | tmp1, |
|
|
N_Vector | tmp2, |
|
|
N_Vector | tmp3 ) |
|
protected |
◆ JacobianWrapper()
int ODESolver::JacobianWrapper |
( |
realtype | t, |
|
|
N_Vector | y, |
|
|
N_Vector | fy, |
|
|
SUNMatrix | J, |
|
|
void * | user_data, |
|
|
N_Vector | tmp1, |
|
|
N_Vector | tmp2, |
|
|
N_Vector | tmp3 ) |
|
staticprotected |
◆ StateSpace()
int ODESolver::StateSpace |
( |
realtype | t, |
|
|
N_Vector | y, |
|
|
N_Vector | ydot ) |
|
protected |
◆ StateSpaceWrapper()
int ODESolver::StateSpaceWrapper |
( |
realtype | t, |
|
|
N_Vector | y, |
|
|
N_Vector | ydot, |
|
|
void * | user_data ) |
|
staticprotected |
Use wrappers similar to DAE_Solver.
Definition at line 42 of file ODESolver.cpp.
◆ step()
Real ODESolver::step |
( |
Real | initial_time | ) |
|
Solve system for the current time.
Number of integration steps
Number of error test fails
Definition at line 67 of file ODESolver.cpp.
SUNMatrix DPsim::ODESolver::A {nullptr} |
|
protected |
Empty matrix for linear solve in each Newton step while solving the Jacobian Matrix.
Definition at line 43 of file ODESolver.h.
◆ abstol
realtype DPsim::ODESolver::abstol = RCONST(1.0e-10) |
|
protected |
Scalar absolute tolerance.
Definition at line 54 of file ODESolver.h.
◆ LS
SUNLinearSolver DPsim::ODESolver::LS {nullptr} |
|
protected |
Empty linear solver object.
Definition at line 45 of file ODESolver.h.
◆ mArkode_mem
void* DPsim::ODESolver::mArkode_mem {nullptr} |
|
protected |
Memory block allocated by ARKode.
Definition at line 35 of file ODESolver.h.
◆ mComponent
CPS::ODEInterface::Ptr DPsim::ODESolver::mComponent |
|
protected |
Component to simulate, possible specialized component needed.
Definition at line 28 of file ODESolver.h.
◆ mFlag
int DPsim::ODESolver::mFlag {0} |
|
protected |
Reusable error-checking flag.
Definition at line 57 of file ODESolver.h.
◆ mImplicitIntegration
bool DPsim::ODESolver::mImplicitIntegration |
|
protected |
Indicates whether the ODE shall be solved using an implicit scheme.
Definition at line 41 of file ODESolver.h.
◆ mJacFunction
CPS::ODEInterface::JacFn DPsim::ODESolver::mJacFunction |
|
protected |
◆ mProbDim
Int DPsim::ODESolver::mProbDim |
|
protected |
Number of differential Variables (states)
Definition at line 31 of file ODESolver.h.
◆ mStates
N_Vector DPsim::ODESolver::mStates {nullptr} |
|
protected |
◆ mStSpFunction
◆ mTimestep
Real DPsim::ODESolver::mTimestep |
|
protected |
◆ reltol
realtype DPsim::ODESolver::reltol = RCONST(1.0e-6) |
|
protected |
The documentation for this class was generated from the following files: