TBTK
Need a break? Support the development by playing Polarity Puzzles
Greens.h
1 /* Copyright 2018 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 
17 
24 #ifndef COM_DAFER45_TBTK_PROPERTY_EXTRACTOR_GREENS
25 #define COM_DAFER45_TBTK_PROPERTY_EXTRACTOR_GREENS
26 
27 #include "TBTK/Solver/Greens.h"
28 #include "TBTK/Property/Density.h"
30 #include "TBTK/Property/LDOS.h"
34 
35 //#include <initializer_list>
36 #include <iostream>
37 
38 namespace TBTK{
39 namespace PropertyExtractor{
40 
42 class Greens : public PropertyExtractor{
43 public:
45  Greens(Solver::Greens &cSolver);
46 
48  virtual ~Greens();
49 
51  virtual void setEnergyWindow(
52  double lowerBound,
53  double upperBound,
54  int energyResolution
55  );
56 
58  virtual Property::Density calculateDensity(
59  Index pattern,
60  Index ranges
61  );
62 
64  virtual Property::Density calculateDensity(
65  std::vector<Index> patterns
66  );
67 
69  virtual Property::LDOS calculateLDOS(
70  std::vector<Index> patterns
71  );
72 private:
74  Solver::Greens *solver;
75 
77  virtual const Solver::Solver& getSolver() const;
78 
80  static void calculateDensityCallback(
81  PropertyExtractor *cb_this,
82  Property::Property &property,
83  const Index &index,
84  int offset,
85  Information &information
86  );
87 
90  static void calculateLDOSCallback(
91  PropertyExtractor *cb_this,
92  Property::Property &property,
93  const Index &index,
94  int offset,
95  Information &information
96  );
97 };
98 
99 inline const Solver::Solver& Greens::getSolver() const{
100  return *solver;
101 }
102 
103 }; //End of namespace PropertyExtractor
104 }; //End of namespace TBTK
105 
106 #endif
107 
PropertyExtractor.h
Generates IndexTrees to be used as loop ranges and memory layout for Properties in the PropertyExtrac...
LDOS.h
Property container for local density of states (LDOS).
SpinPolarizedLDOS.h
Property container for spin-polarized local density of states (spin-polarized LDOS).
Magnetization.h
Property container for magnetization.
GreensFunction.h
Property container for the Green's function.
Density.h
Property container for density.