TBTK
Need a break? Support the development by playing Polarity Puzzles
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 
52 public:
55 
57  virtual ~ChebyshevExpander();
58 
60  virtual void setEnergyWindow(
61  double lowerBound,
62  double upperBound,
63  int energyResolution
64  );
65 
68  Index to,
69  Index from,
70  Property::GreensFunction::Type type = Property::GreensFunction::Type::Retarded
71  );
72 
75  std::vector<std::vector<Index>> patterns,
76  Property::GreensFunction::Type type = Property::GreensFunction::Type::Retarded
77  );
78 
81  std::vector<Index> &to,
82  Index from,
83  Property::GreensFunction::Type type = Property::GreensFunction::Type::Retarded
84  );
85 
87  virtual std::complex<double> calculateExpectationValue(
88  Index to,
89  Index from
90  );
91 
94  Index pattern,
95  Index ranges
96  );
97 
100  std::vector<Index> patterns
101  );
102 
105  Index pattern,
106  Index ranges
107  );
108 
111  std::vector<Index> patterns
112  );
113 
115  virtual Property::LDOS calculateLDOS(Index pattern, Index ranges);
116 
119  std::vector<Index> patterns
120  );
121 
124  Index pattern,
125  Index ranges
126  );
127 
130  std::vector<Index> patterns
131  );
132 private:
134  Solver::ChebyshevExpander *cSolver;
135 
137  virtual const Solver::Solver& getSolver() const;
138 
141  static void calculateDensityCallback(
142  PropertyExtractor *cb_this,
143  Property::Property &property,
144  const Index &index,
145  int offset,
146  Information &information
147  );
148 
151  static void calculateMAGCallback(
152  PropertyExtractor *cb_this,
153  Property::Property &property,
154  const Index &index,
155  int offset,
156  Information &information
157  );
158 
161  static void calculateLDOSCallback(
162  PropertyExtractor *cb_this,
163  Property::Property &property,
164  const Index &index,
165  int offset,
166  Information &information
167  );
168 
171  static void calculateSP_LDOSCallback(
172  PropertyExtractor *cb_this,
173  Property::Property &property,
174  const Index &index,
175  int offset,
176  Information &information
177  );
178 };
179 
180 inline const Solver::Solver& ChebyshevExpander::getSolver() const{
181  return *cSolver;
182 }
183 
184 }; //End of namespace PropertyExtractor
185 }; //End of namespace TBTK
186 
187 #endif
Base class for Solvers.
Definition: Solver.h:42
Type
Definition: GreensFunction.h:47
Property container for the local density of states (LDOS).
Definition: LDOS.h:48
Extracts physical properties from Solver::ChebyshevExpander.
Definition: ChebyshevExpander.h:51
virtual Property::SpinPolarizedLDOS calculateSpinPolarizedLDOS(Index pattern, Index ranges)
Property container for magnetization.
Definition: Magnetization.h:44
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:69
Generates IndexTrees to be used as loop ranges and memory layout for Properties in the PropertyExtrac...
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.
Abstract Property class.
Definition: Property.h:36
Physical index.
Definition: Index.h:44
Base class for PropertyExtractors.
Definition: PropertyExtractor.h:64
Definition: Boolean.h:32
Property container for spin-polarized local density of states (spin-polarized LDOS).
Definition: SpinPolarizedLDOS.h:46
Property container for density.
Definition: Density.h:43
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:44