Greens-code
A modular quantum transport code
potential_hamiltonian.hpp
1 #ifndef POT_HAMILT_DEC_HPP
2 #define POT_HAMILT_DEC_HPP
3 
4 #include "rectangle.hpp"
6 #include "funcs_base.hpp"
7 
8 class Potential;
9 class Rectangle;
10 
12 
22 public:
23 
25  ~ExtPot_Hamiltonian() throw() {}
26 
27 private:
28 
29  const char* name() const {return "ExtPot_Decorator";};
30 
31  typedef std::list<STD_TR1::shared_ptr< Potential > > T_Potentiale;
32  STD_TR1::shared_ptr<T_Potentiale> Potentiale;
33 
34  void init_Decorator() ;
35 
36  void prae_create_H0() const;
37  void post_create_H0() const;
38  void prae_create_HI() const;
39  void post_create_HI() const;
40  void prae_create_HIt() const;
41  void post_create_HIt() const;
42 
43 };
44 
46 
56 public:
57 
59  ~ChangeHop_Hamiltonian() throw() {}
60 
61 private:
62  vector_Object::ref hopvec_v;
63  vector_Object::ref hopvec_h;
64  bool add_not_mult;
65  mutable bool nowh0;
66 
67  const char* name() const {return "ChangeHop_Decorator";};
68 
69  void init_Decorator() ;
70 
71  void Inserting(row r, column c, complex v) const;
72 
73  void prae_create_H0() const;
74  void post_create_H0() const;
75  void prae_create_HI() const;
76  void post_create_HI() const;
77  void prae_create_HIt() const;
78  void post_create_HIt() const;
79 
80 };
81 
83 
93 public:
94 
96  ~ChangeHop2D_Hamiltonian() throw() {}
97 
98 private:
99  function2d_Object::ref hopfunc;
100  mutable STD_TR1::shared_ptr<std::vector<double> > values;
101 
102  bool always_mult;
103  bool add_not_mult;
104  mutable bool nowh0;
105 
106  const char* name() const {return "ChangeHop2D_Decorator";};
107 
108  void init_Decorator() ;
109 
110  void update_values() const;
111 
112  void Inserting(row r, column c, complex v) const;
113 
114  void prae_create_H0() const;
115  void post_create_H0() const;
116  void prae_create_HI() const;
117  void post_create_HI() const;
118  void prae_create_HIt() const;
119  void post_create_HIt() const;
120 
121 };
122 
123 
136 public:
137 
139  ~periodic_Hamiltonian() throw() {};
140 
141 private:
142  int sub_ny;
143  int nx;
144  double big_dx;
145  Rectangle::ref my_R;
146  Hamiltonian::ref my_H;
147  std::unique_ptr<pencil> get_pencil_() const;
148  const std::string& get_pencil_name_() const;
149 
150  double dx_sh_() const;
151  double dy_sh_() const;
152  double width_sh_() const;
153  point_Positions::ref rxy_sh_() const;
154  size_t layers_() const {return my_H->layers();}
155  int ny_layer_sh_(size_t) const;
156  void createperiodicH0(Matrix&) const;
157  void createperiodicHI(Matrix&) const;
158 
159 
160  const char* name() const { return "periodic_Hamiltonian";}
161 
162  void init_H_params();
163  void init_ny_dependent_H_params(){};
164 };
165 
166 #endif
Definitions of abstract Rectangle base class.
An abstract base class defining potentials, use with ExtPot_Hamiltonian.
Definition: abstract_potential.hpp:38
Abstract class that defines a geomeetry.
Definition: rectangle.hpp:31
Definition: potential_hamiltonian.hpp:135
Definition of abstract base class Hamiltonian_Decorator and simple_Hamiltonian_Decorator.
Decorator which modifies 1st nearest neighbor hopping in 2D.
Definition: potential_hamiltonian.hpp:92
Base Matrix class for access to 2D number grids.
Definition: matrix.hpp:82
Decorator which adds a potential to a Hamiltonian.
Definition: potential_hamiltonian.hpp:21
Definition: hamiltonian_decorator.hpp:13
Decorator which modifies 1st nearest neighbor hopping.
Definition: potential_hamiltonian.hpp:55
The abstract base class for any periodic Hamiltonian.
Definition: hamiltonian.hpp:131