NanoStructures  1.0
DMFT solver for layered, strongly correlated nanostructures
hilbertsubspace.h
Go to the documentation of this file.
1 #ifndef HILBERTSUBSPACE_H
2 #define HILBERTSUBSPACE_H
3 
12 /*
13  * Copyright (c) 2014 Christoph Schuette.
14  *
15  * The license and distribution terms for this file may be
16  * found in the file LICENSE in this distribution
17  */
18 
19 #include "../math/matrix.h"
20 #include "../math/vector.h"
21 
22 namespace nrg {
23 
29  public:
35  HilbertSubSpace(int Q, int Sz);
36 
37  // getters and setters
38 
43  inline int getQ() {
44  return m_Q;
45  }
46 
51  inline int getSz() {
52  return m_Sz;
53  }
54 
59  inline int getKeptStates() {
60  return m_nKeptStates;
61  }
62 
67  void setKeptStates(int keptStates) {
68  m_nKeptStates = keptSta tes;
69  }
70 
78  return m_H;
79  }
80 
86  m_H = H;
87  }
88 
94  return m_E;
95  }
96 
102  void setR(int i, int r) {
103  m_r[i] = r;
104  }
105 
111  int getR(int i) {
112  return m_r[i];
113  }
114 
120  return m_chainOperatorElementsUp;
121  }
122 
128  return m_chainOperatorElementsDown;
129  }
130 
131  inline math::Matrix& getDensityMatrixEigenBasis() {
132  return m_densityMatrixEigenBasis;
133  }
134 
135  inline math::Matrix& getDensityMatrix() {
136  return m_densityMatrix;
137  }
138 
145  return m_fUp;
146  }
147 
154  return m_fDown;
155  }
156 
163  return m_fffUp;
164  }
165 
172  return m_fffDown;
173  }
174  protected:
175  int m_Q;
176  int m_Sz;
177  int m_r[4];
178  int m_nKeptStates;
179 
180  math::Matrix m_H;
181  math::Vector m_E;
182  math::Matrix m_chainOperatorElementsUp;
183  math::Matrix m_chainOperatorElementsDown;
184  math::Matrix m_densityMatrix;
185  math::Matrix m_densityMatrixEigenBasis;
186  math::Matrix m_fUp;
187  math::Matrix m_fDown;
188  math::Matrix m_fffUp;
189  math::Matrix m_fffDown;
190  };
191 }
192 
193 #endif // HILBERTSUBSPACE_H
math::Matrix & getLocalMatrixElementDown2()
retrieves a reference to other impurity matrix elements for spin down electrons Take a look at the "s...
Definition: hilbertsubspace.h:171
void setHamiltonian(math::Matrix &H)
set the Hamiltonian H
Definition: hilbertsubspace.h:85
Definition: vector.h:5
math::Vector & getEnergies()
returns a reference to the vector of eigenenergies
Definition: hilbertsubspace.h:93
HilbertSubSpace(int Q, int Sz)
constructs a subspace with quantum numbers Q and Sz
Definition: hilbertsubspace.cpp:4
int getR(int i)
retrieves the # of kept states for ith hilbert space of the prev. iteration
Definition: hilbertsubspace.h:111
int getSz()
returns the spin quantum number Sz of the subspace
Definition: hilbertsubspace.h:51
math::Matrix & getLocalMatrixElementUp()
retrieves a reference to impurity matrix elements for spin down electrons Take a look at the "self-en...
Definition: hilbertsubspace.h:144
void setKeptStates(int keptStates)
sets the number of kept states for the subspace
Definition: hilbertsubspace.h:67
Definition: matrix.h:7
HilbertSubSpace: Hilbert subspace for charge quantum number Q and spin Sz. This class contains the ei...
Definition: hilbertsubspace.h:28
int getQ()
returns the charge quantum number Q of the subspace
Definition: hilbertsubspace.h:43
math::Matrix & getChainElementsUp()
retrieves a reference to chain matrix elements for spin up electrons
Definition: hilbertsubspace.h:119
int getKeptStates()
returns the numer of kept states for the subspace
Definition: hilbertsubspace.h:59
math::Matrix & getChainElementsDown()
retrieves a reference to chain matrix elements for spin down electrons
Definition: hilbertsubspace.h:127
void setR(int i, int r)
sets the # of kept states for ith hilbert space of the prev. iteration
Definition: hilbertsubspace.h:102
math::Matrix & getLocalMatrixElementDown()
retrieves a reference to impurity matrix elements for spin down electrons Take a look at the "self-en...
Definition: hilbertsubspace.h:153
math::Matrix & getHamiltonian()
returns reference to the Hamiltonian/unitary transformation After diagonalization Lapack turns this H...
Definition: hilbertsubspace.h:77
math::Matrix & getLocalMatrixElementUp2()
retrieves a reference to other impurity matrix elements for spin down electrons Take a look at the "s...
Definition: hilbertsubspace.h:162