TBTK
ChebyshevExpander.h
1 /* Copyright 2016 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_C_PROPERTY_EXTRACTOR
24 #define COM_DAFER45_TBTK_C_PROPERTY_EXTRACTOR
25 
26 #include "TBTK/Solver/ChebyshevExpander.h"
27 #include "TBTK/Property/Density.h"
29 #include "TBTK/Property/LDOS.h"
33 
34 //#include <initializer_list>
35 #include <iostream>
36 
37 namespace TBTK{
38 namespace PropertyExtractor{
39 
42 public:
45  Solver::ChebyshevExpander &cSolver/*,
46  int numCoefficients,
47  bool useGPUToCalculateCoefficients,
48  bool useGPUToGenerateGreensFunctions,
49  bool useLookupTable = true*/
50  );
51 
53  virtual ~ChebyshevExpander();
54 
56  virtual void setEnergyWindow(
57  double lowerBound,
58  double upperBound,
59  int energyResolution
60  );
61 
63 // Property::GreensFunction* calculateGreensFunction(
65  Index to,
66  Index from,
67  Property::GreensFunction::Type type = Property::GreensFunction::Type::Retarded
68  );
69 
72 // std::initializer_list<std::initializer_list<Index>> patterns,
73  std::vector<std::vector<Index>> patterns,
74  Property::GreensFunction::Type type = Property::GreensFunction::Type::Retarded
75  );
76 
78 // Property::GreensFunction** calculateGreensFunctions(
80  std::vector<Index> &to,
81  Index from,
82  Property::GreensFunction::Type type = Property::GreensFunction::Type::Retarded
83  );
84 
86  virtual std::complex<double> calculateExpectationValue(
87  Index to,
88  Index from
89  );
90 
93  Index pattern,
94  Index ranges
95  );
96 
99 // std::initializer_list<Index> patterns
100  std::vector<Index> patterns
101  );
102 
105  Index pattern,
106  Index ranges
107  );
108 
111 // std::initializer_list<Index> patterns
112  std::vector<Index> patterns
113  );
114 
116  virtual Property::LDOS calculateLDOS(Index pattern, Index ranges);
117 
120 // std::initializer_list<Index> pattern
121  std::vector<Index> patterns
122  );
123 
126  Index pattern,
127  Index ranges
128  );
129 
132 // std::initializer_list<Index> pattern
133  std::vector<Index> patterns
134  );
135 private:
137  Solver::ChebyshevExpander *cSolver;
138 
140 // int numCoefficients;
141 
143 // bool useLookupTable;
144 
147 // bool useGPUToCalculateCoefficients;
148 
151 // bool useGPUToGenerateGreensFunctions;
152 
155  static void calculateDensityCallback(
156  PropertyExtractor *cb_this,
157  void *density,
158  const Index &index,
159  int offset
160  );
161 
164  static void calculateMAGCallback(
165  PropertyExtractor *cb_this,
166  void *density,
167  const Index &index,
168  int offset
169  );
170 
173  static void calculateLDOSCallback(
174  PropertyExtractor *cb_this,
175  void *ldos,
176  const Index &index,
177  int offset
178  );
179 
182  static void calculateSP_LDOSCallback(
183  PropertyExtractor *cb_this,
184  void *sp_ldos,
185  const Index &index,
186  int offset
187  );
188 
190 // void ensureLookupTableIsReady();
191 };
192 
193 }; //End of namespace PropertyExtractor
194 }; //End of namespace TBTK
195 
196 #endif
Type
Definition: GreensFunction.h:39
Property container for local density of states (LDOS).
Definition: LDOS.h:33
Definition: ChebyshevExpander.h:41
virtual Property::SpinPolarizedLDOS calculateSpinPolarizedLDOS(Index pattern, Index ranges)
Property container for magnetization.
Definition: Magnetization.h:35
virtual std::complex< double > calculateExpectationValue(Index to, Index from)
Property container for local density of states (LDOS).
Solves a Model using the Chebyshev method.
Definition: ChebyshevExpander.h:62
Base class PropertyExtractors.
ChebyshevExpander(Solver::ChebyshevExpander &cSolver)
Property container for spin-polarized local density of states (spin-polarized LDOS).
Property container for density.
Property container for the Green&#39;s function.
virtual Property::Magnetization calculateMagnetization(Index pattern, Index ranges)
Property::GreensFunction calculateGreensFunctions(std::vector< Index > &to, Index from, Property::GreensFunction::Type type=Property::GreensFunction::Type::Retarded)
virtual Property::Density calculateDensity(Index pattern, Index ranges)
Property container for magnetization.
Flexible physical index.
Definition: Index.h:69
Definition: PropertyExtractor.h:44
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 void setEnergyWindow(double lowerBound, double upperBound, int energyResolution)
virtual Property::LDOS calculateLDOS(Index pattern, Index ranges)
Property::GreensFunction calculateGreensFunction(Index to, Index from, Property::GreensFunction::Type type=Property::GreensFunction::Type::Retarded)
Property container for the Green&#39;s function.
Definition: GreensFunction.h:36