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
Simulated_.h
Go to the documentation of this file.
1 // Copyright András Vukics 2006–2014. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.txt)
3 // -*- C++ -*-
4 #ifndef CPPQEDCORE_UTILS_SIMULATED__H_INCLUDED
5 #define CPPQEDCORE_UTILS_SIMULATED__H_INCLUDED
6 
7 #include "SimulatedFwd.h"
8 
9 #include "ParsTrajectory.h"
10 #include "Trajectory.h"
11 
12 
13 namespace trajectory {
14 
16 
26 template<typename A>
27 class Simulated : public Adaptive<A>
28 {
29 public:
30  typedef Adaptive<A> Base;
31 
33 
34  Simulated(A&, typename Evolved::Derivs, double dtInit,
35  double, double,
36  const A& scaleAbs=A(),
38 
39  Simulated(A& array, typename Evolved::Derivs derivs, double dtInit,
40  const ParsEvolved& pe,
41  const A& scaleAbs=A(),
42  const evolved::Maker<A>& maker=evolved::MakerGSL<A>()) : Simulated(array,derivs,dtInit,pe.epsRel,pe.epsAbs,scaleAbs,maker) {}
43 
44 private:
45  virtual void displayPreHook () const {}
46  virtual void displayPostHook() const {}
47 
48  virtual void step_v(double deltaT) final {this->getEvolved()->step(deltaT);}
49 
50  virtual std::ostream& display_v(std::ostream&, int) const final;
51 
52  virtual std::ostream& displayKey_v(std::ostream& os, size_t&) const final {return os;}
53 
54  virtual std::ostream& displayParameters_v(std::ostream& os) const final {return Base::displayParameters_v(os<<"\n# Simulated.\n");}
55 
56  virtual const std::string trajectoryID_v() const final {return "Simulated";}
57 
58 };
59 
60 
61 } // trajectory
62 
63 
64 #endif // CPPQEDCORE_UTILS_SIMULATED__H_INCLUDED
double & epsRel
relative precision of ODE stepping (cf. evolved::TimeStepBookkeeper)
Defines the basic classes of the trajectory-bundle.
Factory class for Evolved types.
Definition: Evolved.h:231
The trajectory-bundle.
A common interface for (adaptive stepsize) ODE drivers.
Definition: Evolved.h:170
Class fully implementing the Adaptive interface by displaying (and serializing) the whole content of ...
Definition: Simulated_.h:27
Implements Maker and incorporates MakerGSL::_, the actual GSL-based implementation of the Evolved int...
Definition: EvolvedGSL.h:21
Aggregate condensing parameters concerning adaptive ODE evolution (cf. Adaptive::Adaptive()) in the s...
Adaptive is basically an evolved::Evolved wrapped into the Trajectory interface.
Definition: Trajectory.h:288
double & epsAbs
absolute precision ”
Defines parameter aggergates to Trajectory.h.
boost::function< void(double, const A &, A &)> Derivs
the strategy functor to calculate time derivative at a given time (3rd argument for output) ...
Definition: Evolved.h:173