TBTK
Need a break? Support the development by playing Polarity Puzzles
SelfEnergy.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 
25 #ifndef COM_DAFER45_TBTK_PROPERTY_EXTRACTOR_SELF_ENERGY
26 #define COM_DAFER45_TBTK_PROPERTY_EXTRACTOR_SELF_ENERGY
27 
28 #include "TBTK/Solver/SelfEnergy.h"
29 #include "TBTK/Property/SelfEnergy.h"
31 
32 #include <complex>
33 //#include <initializer_list>
34 
35 namespace TBTK{
36 namespace PropertyExtractor{
37 
40 class SelfEnergy : public PropertyExtractor{
41 public:
45  SelfEnergy(Solver::SelfEnergy &solver);
46 
48  virtual Property::SelfEnergy calculateSelfEnergy(
49  std::vector<Index> patterns
50  );
51 private:
53  static void calculateSelfEnergyCallback(
54  PropertyExtractor *cb_this,
55  Property::Property &property,
56  const Index &index,
57  int offset,
58  Information &information
59  );
60 
62  Solver::SelfEnergy *solver;
63 
65  std::vector<std::complex<double>> energies;
66 
68  virtual const Solver::Solver& getSolver() const;
69 };
70 
71 inline const Solver::Solver& SelfEnergy::getSolver() const{
72  return *solver;
73 }
74 
75 }; //End of namespace PropertyExtractor
76 }; //End of namespace TBTK
77 
78 #endif
79 
Generates IndexTrees to be used as loop ranges and memory layout for Properties in the PropertyExtrac...
Definition: Boolean.h:32