TBTK
Need a break? Support the development by playing Polarity Puzzles
SelfEnergy2.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_ENERGY2
26 #define COM_DAFER45_TBTK_PROPERTY_EXTRACTOR_SELF_ENERGY2
27 
28 #include "TBTK/Solver/SelfEnergy2.h"
29 #include "TBTK/Property/SelfEnergy.h"
31 
32 #include <complex>
33 
34 namespace TBTK{
35 namespace PropertyExtractor{
36 
39 class SelfEnergy2 : public PropertyExtractor{
40 public:
44  SelfEnergy2(Solver::SelfEnergy2 &solver);
45 
47  virtual Property::SelfEnergy calculateSelfEnergy(
48  std::vector<Index> patterns
49  );
50 private:
51  /***/
52  class SelfEnergyBlockInformation : public Information{
53  public:
57  SelfEnergyBlockInformation();
58 
61  void setCalculateSelfEnergyForAllBlocks(
62  bool calculateSelfEnergyForAllBlocks
63  );
64 
67  bool getCalculateSelfEnergyForAllBlocks() const;
68  private:
71  bool calculateSelfEnergyForAllBlocks;
72  };
73 
75  static void calculateSelfEnergyCallback(
76  PropertyExtractor *cb_this,
77  Property::Property &property,
78  const Index &index,
79  int offset,
80  Information &information
81  );
82 
84  Solver::SelfEnergy2 *solver;
85 
87  virtual const Solver::Solver& getSolver() const;
88 };
89 
90 inline void SelfEnergy2::SelfEnergyBlockInformation::setCalculateSelfEnergyForAllBlocks(
91  bool calculateSelfEnergyForAllBlocks
92 ){
93  this->calculateSelfEnergyForAllBlocks
94  = calculateSelfEnergyForAllBlocks;
95 }
96 
97 inline bool SelfEnergy2::SelfEnergyBlockInformation::getCalculateSelfEnergyForAllBlocks(
98 ) const{
99  return calculateSelfEnergyForAllBlocks;
100 }
101 
102 inline const Solver::Solver& SelfEnergy2::getSolver() const{
103  return *solver;
104 }
105 
106 }; //End of namespace PropertyExtractor
107 }; //End of namespace TBTK
108 
109 #endif
110 
Generates IndexTrees to be used as loop ranges and memory layout for Properties in the PropertyExtrac...
Definition: Boolean.h:32