C++QEDCore  v2 Milestone 10
a framework for simulating open quantum dynamics – core
evolved::Evolved< A > Class Template Referenceabstract

A common interface for (adaptive stepsize) ODE drivers. More...

#include <Evolved.h>

+ Inheritance diagram for evolved::Evolved< A >:
+ Collaboration diagram for evolved::Evolved< A >:

Public Types

typedef boost::function< void(double, const A &, A &)> Derivs
 the strategy functor to calculate time derivative at a given time (3rd argument for output)
 
typedef boost::shared_ptr< EvolvedPtr
 
typedef boost::shared_ptr< const EvolvedConstPtr
 
- Public Types inherited from evolved::EvolvedIO< A >
typedef boost::shared_ptr< EvolvedIOPtr
 
typedef boost::shared_ptr< const EvolvedIOConstPtr
 

Public Member Functions

 Evolved (A &, Derivs, double dtInit, double epsRel, double epsAbs)
 straightforward constructor More...
 
void step (double deltaT)
 takes a single adaptive step More...
 
std::ostream & displayParameters (std::ostream &os) const
 delegates to private virtual
 
size_t nFailedSteps () const
 number of failed steps in the last timestep (delegates to pure virtual)
 
Getter
const Derivs getDerivs () const
 
- Public Member Functions inherited from evolved::EvolvedIO< A >
 EvolvedIO (A &, double dtInit, double epsRel, double epsAbs)
 straightforward constructor More...
 
A & getA ()
 
A const & getA () const
 
virtual ~EvolvedIO ()
 necessary in order that EvolvedIO be polymorphic
 
- Public Member Functions inherited from evolved::TimeStepBookkeeper
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
 
double getTime () const
 
void setTime (double t)
 
double getEpsRel () const
 relative precision
 
double getEpsAbs () const
 absolute precision
 

Additional Inherited Members

- Protected Member Functions inherited from evolved::TimeStepBookkeeper
 TimeStepBookkeeper (double dtInit, double epsRel, double epsAbs)
 straightforward constructor More...
 

Detailed Description

template<typename A>
class evolved::Evolved< A >

A common interface for (adaptive stepsize) ODE drivers.

It takes the array type it operates on as template parameter. A given array type can be adapted to the form expected by Evolved by suitable specializations of “memory traits” functions. (cf. ArrayTraits.h, for an implementation for blitz::Array cf. BlitzArrayTraits.h)

The array which is actually "evolved" is not owned by Evolved.

The class uses the strategy idiom for calculating the time derivative. The use of boost::function assures that a rather wide range of entities will be accepted as strategy functor.

Template Parameters
Athe array type
See also
MakerGSL::_

Definition at line 170 of file Evolved.h.

Constructor & Destructor Documentation

template<typename A>
evolved::Evolved< A >::Evolved ( A &  ,
Derivs  ,
double  dtInit,
double  epsRel,
double  epsAbs 
)

straightforward constructor

See also
EvolvedIO::EvolvedIO()

Member Function Documentation

template<typename A>
void evolved::Evolved< A >::step ( double  deltaT)

takes a single adaptive step

Parameters
deltaTmaximum length of the timestep

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