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
structure::DynamicsBase Class Reference

Provides services for dealing with frequency-like parameters, both real and complex, for all elements, frees and interactions alike, which are hence all derived from this class. More...

#include <DynamicsBase.h>

+ Inheritance diagram for structure::DynamicsBase:
+ Collaboration diagram for structure::DynamicsBase:

Public Types

typedef boost::shared_ptr< const DynamicsBasePtr
 
typedef std::tuple< std::string, double, double > RF
 name-value-multiplier tuple for a real frequency-like parameter
 
typedef std::tuple< std::string, dcomp,double > CF
 same for complex
 
typedef std::list< RFRealFreqs
 list of real frequency-like parameters
 
typedef std::list< CFComplexFreqs
 same for complex
 
typedef std::initializer_list< RFRealFreqsInitializer
 
typedef std::initializer_list< CFComplexFreqsInitializer
 

Public Member Functions

 DynamicsBase (const RealFreqs &=emptyRF, const ComplexFreqs &=emptyCF)
 Straightforward constructor.
 
 DynamicsBase (const ComplexFreqs &complexFreqs)
 
 DynamicsBase (RealFreqsInitializer rf, ComplexFreqsInitializer cf={})
 Constructor with initializer lists.
 
 DynamicsBase (ComplexFreqsInitializer cf)
 
 DynamicsBase (RF rf, CF cf=CF())
 
 DynamicsBase (CF cf)
 
 DynamicsBase (RealFreqsInitializer rf, CF cf)
 
 DynamicsBase (RF rf, ComplexFreqsInitializer cf)
 
double highestFrequency () const
 Calculates the fastest timescale of the system from the frequencies stored in the lists.
 
std::ostream & displayParameters (std::ostream &) const
 Displays the content of the stored ostringstream followed by a call to displayMoreParameters.
 

Static Public Attributes

static const RealFreqs emptyRF
 
static const ComplexFreqs emptyCF
 

Protected Member Functions

std::ostringstream & getParsStream ()
 The stored std::ostringstream object, for constructors of clients to write parameters on.
 
virtual std::ostream & displayMoreParameters (std::ostream &) const
 In its default implementation, displayes the frequency-like parameters of the system in a nice format together with their names.
 
Getters
RealFreqsgetRealFreqs ()
 
ComplexFreqsgetComplexFreqs ()
 

Related Functions

(Note that these are not member functions.)

template<int RANK>
const Exact< RANK >::Ptr qse (DynamicsBase::Ptr base)
 Dynamic cast to a shared pointer to Exact More...
 
template<int RANK>
const Hamiltonian< RANK >::Ptr qsh (DynamicsBase::Ptr base)
 Dynamic cast to a shared pointer to Hamiltonian More...
 
template<int RANK>
const Liouvillean< RANK >::Ptr qsl (DynamicsBase::Ptr base)
 Dynamic cast to a shared pointer to Liouvillean More...
 
template<int RANK>
const Averaged< RANK >::Ptr qsa (DynamicsBase::Ptr base)
 Dynamic cast to a shared pointer to Averaged More...
 

Detailed Description

Provides services for dealing with frequency-like parameters, both real and complex, for all elements, frees and interactions alike, which are hence all derived from this class.

Such parameters need a special treatment because every such parameter from all the subsystems (either frees or interactions) of the given physical system has to be considered as a possible largest frequency of the whole system. This largest frequency is needed for determining the initial time-step of the ODE routine.

On the other hand, these parameters (together with all other, non-frequency-like parameters) have to be communicated towards the user when the framework summarizes the parameters of a given run. Therefore, for each such parameter, the class stores not only the value, but also the name of the parameter, plus another real number which multiplies the value of the named frequency, to give the actual frequency as appearing in the ODE.

An example will make this clear. Consider the Hamiltonian of a free mode:

\[\omega a^\dagger a.\]

In this case, the parameter supplied by the user is $\omega$, but the largest frequency appearing in the ODE is actually this times the dimension of the system (the cutoff of the Fock space). Hence, the tuple stored by the class for this particular frequency-like parameter will be something like:

("omega",omega,cutoff)

In the case of a pumping term of the Hamiltonian:

\[\eta\lp a^\dagger+a\rp,\]

the multiplier will be different:

"eta",eta,sqrt(cutoff)

The class also stores an std::ostringstream object, on which the constructor of any client (derived element class) can write its parameters, and these will in turn be displayed when QuantumSystem::displayParameters is called for the system. Cf. the structure-bundle guide.

Definition at line 47 of file DynamicsBase.h.

Friends And Related Function Documentation

template<int RANK>
const Averaged< RANK >::Ptr qsa ( DynamicsBase::Ptr  base)
related

Dynamic cast to a shared pointer to Averaged

Definition at line 103 of file Structure.h.

template<int RANK>
const Exact< RANK >::Ptr qse ( DynamicsBase::Ptr  base)
related

Dynamic cast to a shared pointer to Exact

Definition at line 82 of file Structure.h.

template<int RANK>
const Hamiltonian< RANK >::Ptr qsh ( DynamicsBase::Ptr  base)
related

Dynamic cast to a shared pointer to Hamiltonian

Definition at line 89 of file Structure.h.

template<int RANK>
const Liouvillean< RANK >::Ptr qsl ( DynamicsBase::Ptr  base)
related

Dynamic cast to a shared pointer to Liouvillean

Definition at line 96 of file Structure.h.


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