SIMLIB/C++ 3.09
Loading...
Searching...
No Matches
simlib3::IntegrationMethod Class Referenceabstract

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

#include <simlib.h>

Inheritance diagram for simlib3::IntegrationMethod:
Collaboration diagram for simlib3::IntegrationMethod:

Classes

class  Memory

Public Member Functions

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

Static Public Member Functions

static void StepSim (void)
 step of numerical integration method
static void IntegrationDone (void)
static void SetMethod (const char *name)
 set method which will be used
static const char * GetMethod (void)
static void InitStep (double step_frag)
 initialize step
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
static IntegrationMethod * SearchMethod (const char *name)
 search method in the list of registrated methods

Static Protected Attributes

static bool IsEndStepEvent =false

Private Member Functions

 IntegrationMethod (const IntegrationMethod &)=delete
IntegrationMethod & operator= (const IntegrationMethod &)=delete
 IntegrationMethod ()
 IntegrationMethod (IntegrationMethod &)

Static Private Member Functions

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

Private Attributes

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

Static Private Attributes

static IntegrationMethod * CurrentMethodPtr = &rke
 pointer to the method currently used "rke" is a predefined method (historical reasons, we need rk45)
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 1063 of file simlib.h.

Member Typedef Documentation

◆ Iterator

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, PrevINum, 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()

◆ 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()

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

Definition at line 1130 of file simlib.h.

References CurrentMethodPtr, and method_name.

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()

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

Definition at line 1126 of file simlib.h.

References CurrentMethodPtr, 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()

◆ LastIntegrator()

◆ operator=()

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

References IntegrationMethod().

◆ Prepare()

◆ 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 Integrate(), PrepareStep(), and TurnOff().

◆ SearchMethod()

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

◆ SetErrNo()

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()

◆ 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 Integrate(), and 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::MultiStepMethod, and simlib3::StatusMethod.

Definition at line 261 of file numint.cc.

References Dprintf, PrevINum, and Resize().

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

◆ Memory

friend class Memory
friend

Definition at line 1073 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 1067 of file simlib.h.

Referenced by GetMethod(), IntegrationDone(), Prepare(), SetMethod(), and StepSim().

◆ IsEndStepEvent

◆ ItList

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

Definition at line 1069 of file simlib.h.

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

◆ method_name

const char* simlib3::IntegrationMethod::method_name
private

Definition at line 1070 of file simlib.h.

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

◆ MList

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

Definition at line 1076 of file simlib.h.

Referenced by IntegrationMethod(), and Resize().

◆ MthLstPtr

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

Definition at line 1068 of file simlib.h.

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

◆ PrevINum

size_t simlib3::IntegrationMethod::PrevINum
private

Definition at line 1075 of file simlib.h.

Referenced by IntegrationMethod(), PrepareStep(), and TurnOff().

◆ PtrMList

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

Definition at line 1077 of file simlib.h.

Referenced by IntegrationMethod().


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