SIMLIB/C++  3.07
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Static Protected Member Functions | Static Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
simlib3::IntegrationMethod Class Referenceabstract

IntegrationMethod - Abstract base class for integration methods. More...

#include <simlib.h>

Inheritance diagram for simlib3::IntegrationMethod:
Inheritance graph
[legend]
Collaboration diagram for simlib3::IntegrationMethod:
Collaboration graph
[legend]

Classes

class  Memory
 

Public Member Functions

 IntegrationMethod (const char *name)
 register method to list of methods and name it More...
 
virtual ~IntegrationMethod ()
 destroy integration method (remove from list) More...
 
virtual bool IsSingleStep (void)=0
 
virtual void TurnOff (void)
 turn off integration method: flush memories etc... More...
 
virtual void Integrate (void)=0
 
virtual bool PrepareStep (void)
 prepare object for integration step More...
 
virtual void Resize (size_t size)
 resize all the memories to the given size More...
 

Static Public Member Functions

static void StepSim (void)
 step of numerical integration method More...
 
static void IntegrationDone (void)
 
static void SetMethod (const char *name)
 set method which will be used More...
 
static const char * GetMethod (void)
 
static void InitStep (double step_frag)
 initialize step More...
 
static void FunCall (double step_frag)
 
static void SetOptStep (double opt_step)
 
static void SetStepSize (double step_size)
 
static bool IsConditionFlag (void)
 
static int GetErrNo (void)
 
static void SetErrNo (int num)
 

Protected Types

typedef IntegratorContainer::iterator Iterator
 

Static Protected Member Functions

static Iterator FirstIntegrator (void)
 
static Iterator LastIntegrator (void)
 
static bool StateCond (void)
 check on changes of state conditions More...
 
static IntegrationMethodSearchMethod (const char *name)
 search method in the list of registrated methods More...
 

Static Protected Attributes

static bool IsEndStepEvent =false
 

Private Member Functions

 IntegrationMethod (const IntegrationMethod &)=delete
 
IntegrationMethodoperator= (const IntegrationMethod &)=delete
 
 IntegrationMethod ()
 
 IntegrationMethod (IntegrationMethod &)
 

Static Private Member Functions

static bool Prepare (void)
 initialize integration step More...
 
static void Iterate (void)
 compute new values of state blocks in model without integrators More...
 
static void Summarize (void)
 set up new state after execution of integration step More...
 

Private Attributes

std::list< IntegrationMethod * >::iterator ItList
 
const char * method_name
 
size_t PrevINum
 
std::list< Memory * > MList
 

Static Private Attributes

static IntegrationMethodCurrentMethodPtr = &rke
 pointer to the method currently used "rke" is a predefined method (historical reasons, we need rk45) More...
 
static std::list< IntegrationMethod * > * MthLstPtr =NULL
 
static std::list< Memory * > * PtrMList
 

Friends

class Memory
 

Detailed Description

IntegrationMethod - Abstract base class for integration methods.

Definition at line 1058 of file simlib.h.

Member Typedef Documentation

◆ Iterator

Definition at line 1080 of file simlib.h.

Constructor & Destructor Documentation

◆ IntegrationMethod() [1/4]

simlib3::IntegrationMethod::IntegrationMethod ( const IntegrationMethod )
privatedelete

◆ IntegrationMethod() [2/4]

simlib3::IntegrationMethod::IntegrationMethod ( )
private

◆ IntegrationMethod() [3/4]

simlib3::IntegrationMethod::IntegrationMethod ( IntegrationMethod )
private

◆ IntegrationMethod() [4/4]

simlib3::IntegrationMethod::IntegrationMethod ( const char *  name)
explicit

register method to list of methods and name it

Definition at line 194 of file numint.cc.

References Dprintf, ItList, method_name, MList, MthLstPtr, simlib3::NI_MultDefMeth, PtrMList, and simlib3::SIMLIB_error().

◆ ~IntegrationMethod()

simlib3::IntegrationMethod::~IntegrationMethod ( )
virtual

destroy integration method (remove from list)

Definition at line 222 of file numint.cc.

References Dprintf, ItList, method_name, MthLstPtr, and SIMLIB_internal_error.

Member Function Documentation

◆ FirstIntegrator()

static Iterator simlib3::IntegrationMethod::FirstIntegrator ( void  )
inlinestaticprotected

◆ FunCall()

void simlib3::IntegrationMethod::FunCall ( double  step_frag)
static

◆ GetErrNo()

int simlib3::IntegrationMethod::GetErrNo ( void  )
static

Definition at line 322 of file numint.cc.

References simlib3::SIMLIB_ERRNO.

◆ GetMethod()

static const char* simlib3::IntegrationMethod::GetMethod ( void  )
inlinestatic

Definition at line 1125 of file simlib.h.

References method_name, and simlib3::SetErrNo().

Referenced by simlib3::GetMethod(), simlib3::GetStarter(), and simlib3::SetStarter().

◆ InitStep()

void simlib3::IntegrationMethod::InitStep ( double  step_frag)
static

◆ Integrate()

virtual void simlib3::IntegrationMethod::Integrate ( void  )
pure virtual

◆ IntegrationDone()

static void simlib3::IntegrationMethod::IntegrationDone ( void  )
inlinestatic

Definition at line 1121 of file simlib.h.

References simlib3::SetMethod(), and TurnOff().

Referenced by simlib3::Run().

◆ IsConditionFlag()

bool simlib3::IntegrationMethod::IsConditionFlag ( void  )
static

Definition at line 317 of file numint.cc.

References simlib3::SIMLIB_ConditionFlag.

◆ IsSingleStep()

virtual bool simlib3::IntegrationMethod::IsSingleStep ( void  )
pure virtual

◆ Iterate()

void simlib3::IntegrationMethod::Iterate ( void  )
staticprivate

◆ LastIntegrator()

static Iterator simlib3::IntegrationMethod::LastIntegrator ( void  )
inlinestaticprotected

◆ operator=()

IntegrationMethod& simlib3::IntegrationMethod::operator= ( const IntegrationMethod )
privatedelete

◆ Prepare()

bool simlib3::IntegrationMethod::Prepare ( void  )
staticprivate

◆ PrepareStep()

bool simlib3::IntegrationMethod::PrepareStep ( void  )
virtual

◆ Resize()

void simlib3::IntegrationMethod::Resize ( size_t  size)
virtual

resize all the memories to the given size

Definition at line 271 of file numint.cc.

References Dprintf, and MList.

Referenced by PrepareStep(), and TurnOff().

◆ SearchMethod()

IntegrationMethod * simlib3::IntegrationMethod::SearchMethod ( const char *  name)
staticprotected

◆ SetErrNo()

static void simlib3::IntegrationMethod::SetErrNo ( int  num)
static

◆ SetMethod()

void simlib3::IntegrationMethod::SetMethod ( const char *  name)
static

set method which will be used

Definition at line 75 of file numint.cc.

References CurrentMethodPtr, Dprintf, simlib3::NI_CantSetMethod, SearchMethod(), simlib3::SIMLIB_DynamicFlag, simlib3::SIMLIB_error(), and TurnOff().

Referenced by simlib3::SetMethod().

◆ SetOptStep()

void simlib3::IntegrationMethod::SetOptStep ( double  opt_step)
static

Definition at line 307 of file numint.cc.

References simlib3::SIMLIB_OptStep.

◆ SetStepSize()

void simlib3::IntegrationMethod::SetStepSize ( double  step_size)
static

Definition at line 312 of file numint.cc.

References simlib3::SIMLIB_StepSize.

◆ StateCond()

bool simlib3::IntegrationMethod::StateCond ( void  )
staticprotected

◆ StepSim()

void simlib3::IntegrationMethod::StepSim ( void  )
static

step of numerical integration method

Definition at line 52 of file numint.cc.

References CurrentMethodPtr, Dprintf, Integrate(), simlib3::IntegratorContainer::isAny(), Iterate(), Prepare(), simlib3::SIMLIB_DynamicFlag, Summarize(), and simlib3::Time.

Referenced by simlib3::Run().

◆ Summarize()

void simlib3::IntegrationMethod::Summarize ( void  )
staticprivate

◆ TurnOff()

void simlib3::IntegrationMethod::TurnOff ( void  )
virtual

turn off integration method: flush memories etc...

Reimplemented in simlib3::StatusMethod, and simlib3::MultiStepMethod.

Definition at line 261 of file numint.cc.

References Dprintf, PrevINum, and Resize().

Referenced by IntegrationDone(), SetMethod(), simlib3::MultiStepMethod::TurnOff(), and simlib3::StatusMethod::TurnOff().

Friends And Related Function Documentation

◆ Memory

friend class Memory
friend

Definition at line 1067 of file simlib.h.

Member Data Documentation

◆ CurrentMethodPtr

IntegrationMethod * simlib3::IntegrationMethod::CurrentMethodPtr = &rke
staticprivate

pointer to the method currently used "rke" is a predefined method (historical reasons, we need rk45)

Definition at line 1062 of file simlib.h.

Referenced by simlib3::StatusMethod::GoToState(), Prepare(), SetMethod(), and StepSim().

◆ IsEndStepEvent

bool simlib3::IntegrationMethod::IsEndStepEvent =false
staticprotected

◆ ItList

std::list<IntegrationMethod*>::iterator simlib3::IntegrationMethod::ItList
private

Definition at line 1064 of file simlib.h.

Referenced by IntegrationMethod(), and ~IntegrationMethod().

◆ method_name

const char* simlib3::IntegrationMethod::method_name
private

Definition at line 1065 of file simlib.h.

Referenced by GetMethod(), IntegrationMethod(), and ~IntegrationMethod().

◆ MList

std::list<Memory*> simlib3::IntegrationMethod::MList
private

Definition at line 1071 of file simlib.h.

Referenced by IntegrationMethod(), and Resize().

◆ MthLstPtr

std::list< IntegrationMethod * > * simlib3::IntegrationMethod::MthLstPtr =NULL
staticprivate

◆ PrevINum

size_t simlib3::IntegrationMethod::PrevINum
private

Definition at line 1070 of file simlib.h.

Referenced by PrepareStep(), and TurnOff().

◆ PtrMList

std::list< IntegrationMethod::Memory * > * simlib3::IntegrationMethod::PtrMList
staticprivate

Definition at line 1072 of file simlib.h.

Referenced by simlib3::StatusMethod::GoToState(), and IntegrationMethod().


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