C++QEDCore  2.100.2 (v2 Milestone 10 Development branch)
a framework for simulating open quantum dynamics – core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
evolved::TimeStepBookkeeper Class Reference

Bookkeeps the timestep-data of Evolved. More...

#include <Evolved.h>

+ Inheritance diagram for evolved::TimeStepBookkeeper:

Public Member Functions

double getDtDid () const
 returns the last performed timestep
 
double getDtTry () const
 returns the timestep to try in the next step
 
void setDtTry (double dtTry)
 Sets the timestep to try in the next step. More...
 
void update (double t, double dtTry)
 
TimeStepBookkeeperoperator= (const TimeStepBookkeeper &)
 straightforward assignment operator that avoids self-assignment
 
Actual time getter/setter
double getTime () const
 
void setTime (double t)
 
Getters of precision parameters
double getEpsRel () const
 relative precision
 
double getEpsAbs () const
 absolute precision
 

Protected Member Functions

 TimeStepBookkeeper (double dtInit, double epsRel, double epsAbs)
 straightforward constructor More...
 

Friends

class boost::serialization::access
 

Detailed Description

Bookkeeps the timestep-data of Evolved.

Very rarely used in itself, for the most part it can be considered as a template-parameter independent base of Evolved.

The timestep-regulation policy of adaptive-stepsize drivers is that for the step in hand they perform a timestep of at most dtTry. Thereupon, they report the performed timestep (this is dtDid), and suggest a stepsize for the next step to try, which can be larger than dtDid (this will be the new value of dtTry after the step). Hence, the step can diminish in the actual step, but can grow only in the next step.

Timestep is regulated by two parameters, epsRel limiting the (element-wise) relative precision, and epsAbs the absolute precision. In general, it can be said that anything below epsAbs in absolute value should be considered numerical trash.

ODE steppers must be supplied with a sensible value for the initial timestep to try in the first step.

Definition at line 52 of file Evolved.h.

Constructor & Destructor Documentation

evolved::TimeStepBookkeeper::TimeStepBookkeeper ( double  dtInit,
double  epsRel,
double  epsAbs 
)
protected

straightforward constructor

Parameters
dtInitthe initial timestep to try in the first step
epsRelrelative precision
epsAbsabsolute precision

Member Function Documentation

void evolved::TimeStepBookkeeper::setDtTry ( double  dtTry)
inline

Sets the timestep to try in the next step.

This should be used if there is some factor besides the normal ODE evolution that may modify the timestep (e.g. a quantum jump in a Monte Carlo wave-function evolution). For the most part, this will be a timestep decrease.

Definition at line 70 of file Evolved.h.


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