TBTK
ExactDiagonalizer.h
1 /* Copyright 2017 Kristofer Bj√∂rnson
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
23 #ifndef COM_DAFER45_TBTK_PROPERTY_EXTRACTOR_EXACT_DIAGONALIZER
24 #define COM_DAFER45_TBTK_PROPERTY_EXTRACTOR_EXACT_DIAGONALIZER
25 
26 #include "TBTK/Solver/ExactDiagonalizer.h"
29 
30 #include <complex>
31 
32 namespace TBTK{
33 namespace PropertyExtractor{
34 
36 public:
39 
42 
45  Index to,
46  Index from,
47  Property::GreensFunction::Type type = Property::GreensFunction::Type::Retarded
48  );
49 
51  virtual std::complex<double> calculateExpectationValue(
52  Index to,
53  Index from
54  );
55 
58  Index pattern,
59  Index ranges
60  );
61 
64  Index pattern,
65  Index ranges
66  );
67 
69  virtual Property::LDOS calculateLDOS(Index pattern, Index ranges);
70 
73  Index pattern,
74  Index ranges
75  );
76 private:
78  Solver::ExactDiagonalizer *edSolver;
79 
81  static void calculateDensityCallback(
82  PropertyExtractor *cb_this,
83  void *density,
84  const Index &index,
85  int offset
86  );
87 
90  static void calculateMagnetizationCallback(
91  PropertyExtractor *cb_this,
92  void *density,
93  const Index &index,
94  int offset
95  );
96 
99  static void calculateLDOSCallback(
100  PropertyExtractor *cb_this,
101  void *ldos,
102  const Index &index,
103  int offset
104  );
105 
108  static void calculateSpinPolarizedLDOSCallback(
109  PropertyExtractor *cb_this,
110  void *spinPolarizedLDOS,
111  const Index &index,
112  int offset
113  );
114 };
115 
116 }; //End of namespace PropertyExtractor
117 }; //End of namespace TBTK
118 
119 #endif
Type
Definition: GreensFunction.h:39
Property container for local density of states (LDOS).
Definition: LDOS.h:33
Property container for magnetization.
Definition: Magnetization.h:35
virtual Property::SpinPolarizedLDOS calculateSpinPolarizedLDOS(Index pattern, Index ranges)
ExactDiagonalizer(Solver::ExactDiagonalizer &edSolver)
Base class PropertyExtractors.
Definition: ExactDiagonalizer.h:17
Property container for Green&#39;s function.
Definition: ExactDiagonalizer.h:35
virtual Property::Density calculateDensity(Index pattern, Index ranges)
virtual std::complex< double > calculateExpectationValue(Index to, Index from)
Flexible physical index.
Definition: Index.h:70
Definition: PropertyExtractor.h:44
Property::GreensFunction * calculateGreensFunction(Index to, Index from, Property::GreensFunction::Type type=Property::GreensFunction::Type::Retarded)
Definition: ModelFactory.h:35
Property container for spin-polarized local density of states (spin-polarized LDOS).
Definition: SpinPolarizedLDOS.h:37
Property container for density.
Definition: Density.h:33
virtual Property::LDOS calculateLDOS(Index pattern, Index ranges)
virtual Property::Magnetization calculateMagnetization(Index pattern, Index ranges)
Property container for Green&#39;s function.
Definition: GreensFunction.h:36