DPsim
Loading...
Searching...
No Matches
CPS::ODEintInterface Class Referenceabstract

#include <ODEintInterface.h>

Public Types

typedef std::shared_ptr< ODEintInterfacePtr
 
using stateFnc = std::function<void(const double *, double *, const double)>
 

Public Member Functions

virtual int num_states () const =0
 Returns number of differential variables.
 
virtual void odeint (const double y[], double ydot[], double t)=0
 Sets up ODE system in ydot.
 
virtual void pre_step ()=0
 Needed for computations which have to be carried out before the numerical approximation step.
 
virtual void post_step ()=0
 Writes the values from the constructed state vector back into the original fields.
 
virtual double * state_vector ()=0
 Returns Pointer to state Vector of the componente.
 
virtual void set_state_vector (std::vector< double > y)=0
 Writes the computed solution to the component.
 

Detailed Description

Definition at line 15 of file ODEintInterface.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<ODEintInterface> CPS::ODEintInterface::Ptr

Definition at line 17 of file ODEintInterface.h.

◆ stateFnc

using CPS::ODEintInterface::stateFnc = std::function<void(const double *, double *, const double)>

Definition at line 18 of file ODEintInterface.h.

Member Function Documentation

◆ num_states()

virtual int CPS::ODEintInterface::num_states ( ) const
pure virtual

Returns number of differential variables.

◆ odeint()

virtual void CPS::ODEintInterface::odeint ( const double y[],
double ydot[],
double t )
pure virtual

Sets up ODE system in ydot.

◆ post_step()

virtual void CPS::ODEintInterface::post_step ( )
pure virtual

Writes the values from the constructed state vector back into the original fields.

◆ pre_step()

virtual void CPS::ODEintInterface::pre_step ( )
pure virtual

Needed for computations which have to be carried out before the numerical approximation step.

◆ set_state_vector()

virtual void CPS::ODEintInterface::set_state_vector ( std::vector< double > y)
pure virtual

Writes the computed solution to the component.

◆ state_vector()

virtual double * CPS::ODEintInterface::state_vector ( )
pure virtual

Returns Pointer to state Vector of the componente.


The documentation for this class was generated from the following file: