C++QEDElements  2.100.2 (v2 Milestone 10 Development branch)
a framework for simulating open quantum dynamics – generic elements
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
MLJC.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 CPPQEDELEMENTS_INTERACTIONS_MLJC_H_INCLUDED
5 #define CPPQEDELEMENTS_INTERACTIONS_MLJC_H_INCLUDED
6 
7 #include "MLJCFwd.h"
8 
9 #include "Mode_.h"
10 #include "MultiLevel_.h"
11 
12 #include "Interaction.h"
13 
14 #include <boost/fusion/algorithm/transformation/transform.hpp>
15 
16 
18 template<int I, int J>
19 class Coupling : public multilevel::Storage<dcomp>, public tmptools::pair_c<I,J>
20 {
21 public:
23 
24 };
25 
26 
27 namespace mljc {
28 
29 template<int NL, typename VC>
31 {
32 public:
34 
35  typedef typename MultiLevelBase<NL>::Ptr MultiLevelPtr;
36 
37  Base(MultiLevelPtr, mode::Ptr, const VC&);
38 
39 private:
40  class ElementaryCoupling;
41 
42  void addContribution_v(double, const StateVectorLow&, StateVectorLow&, double) const;
43 
44  template<int,int>
45  struct ModeDynamics;
46 
47 
48  class CouplingToModeDynamics
49  {
50  public:
51  CouplingToModeDynamics(MultiLevelPtr ml, mode::Ptr mode) : ml_(ml), mode_(mode) {}
52 
53  template<typename> struct result;
54 
55  template<typename T, typename C>
56  struct result<T(const C&)> : mpl::identity<ModeDynamics<C::first,C::second> > {};
57 
58  template<typename C>
59  const ModeDynamics<C::first,C::second>
60  operator()(const C& coupling) const
61  {
62  return ModeDynamics<C::first,C::second>(ml_,mode_,coupling.get());
63  }
64 
65  private:
66  const MultiLevelPtr ml_ ;
67  const mode::Ptr mode_;
68 
69  };
70 
71 
72  typedef typename boost::fusion::result_of::transform<VC const,CouplingToModeDynamics>::type ModeDynamicss;
73 
74  const ModeDynamicss mds_;
75 
76 };
77 
78 
79 } // mljc
80 
81 
84 #define BIG_NAMESPACE_NAME mljc
85 #define BIG_CLASS_NAME MLJC
86 #define BIG_ADDITIONAL_PARAMETERS , const mljc::Pars<VC>& p
87 #define BIG_ADDITIONAL_PARAMETERS_PASS ,p.gs
88 #define BIG_ADDITIONAL_TEMPLATE_PARAMETERS int NL, typename VC,
89 #define BIG_ADDITIONAL_TEMPLATE_PARAMETERS_PASS <NL,VC>
90 
92 
95 #endif // CPPQEDELEMENTS_INTERACTIONS_MLJC_H_INCLUDED
Class representing an elementary coupling term (a here) with a compile-time pair and a runtime comp...
Definition: MLJC.h:19
quantumdata::Types< 1 >::StateVectorLow StateVectorLow
Defines the Mode bundle (tackling the dynamics of a single harmonic-oscillator mode) ...
Contains helpers for the Mode bundle.
Definition: Mode_.h:23
Definition: MLJC.h:27
Defines free elements of the MultiLevel bundle.
A “preprocessor factory” to binary interactions.