48 const double err_coef = 0.02;
52 static bool DoubleStepFlag;
54 Dprintf((
" Euler integration step "));
73 A[i] = (*ip)->GetOldDiff();
74 (*ip)->SetState((*ip)->GetOldState() + dthlf*(*ip)->GetDiff());
96 A[i] -= (*ip)->GetDiff();
97 (*ip)->SetState(
si[i] + dthlf*(*ip)->GetDiff());
111 DoubleStepFlag =
true;
120 if(eerr < err_coef*terr)
135 _Print(
"\n Integrator[%lu] ",(
unsigned long)i);
140 DoubleStepFlag =
false;
152 if(wasContractStepFlag) {
static bool IsEndStepEvent
int _Print(const char *fmt,...)
output of messages to stdout, too
void SIMLIB_Dynamic()
performs evaluation of integrators and status blocks
double SIMLIB_StepStartTime
last step time
double SIMLIB_ContractStep
requested step size
const double & OptStep
optimal integration step
static void StoreState(Memory &di, Memory &si, StatusMemory &xi)
store state of integrators and status variables
Implementation of class CalendarList interface is static - using global functions in SQS namespace...
double max(double a, double b)
double SIMLIB_RelativeError
relative error
static void RestoreState(double dthlf, Memory &di, Memory &si, StatusMemory &xi)
restore state of integrators and status variables
void SIMLIB_warning(const enum _ErrEnum N)
print warning message and continue
const double & Time
model time (is NOT the block)
double SIMLIB_StepSize
actual step
virtual void Integrate(void) override
static bool StateCond(void)
check on changes of state conditions
double min(double a, double b)
double SIMLIB_AbsoluteError
absolute error
bool SIMLIB_ContractStepFlag
requests shorter step
Internal header file for SIMLIB/C++.
static Iterator LastIntegrator(void)
static Iterator FirstIntegrator(void)
Main SIMLIB/C++ interface.
IntegratorContainer::iterator Iterator
#define _SetTime(t, x)
macro for simple assignement to internal time variables
static void GoToState(Memory &di, Memory &si, StatusMemory &xi)
move startpoint to given state
bool SIMLIB_ConditionFlag
double SIMLIB_MinStep
minimal step
double SIMLIB_DeltaTime
Time-SIMLIB_StepStartTime.
double SIMLIB_OptStep
optimal step
double SIMLIB_MaxStep
max. step