TBTK
RPASusceptibility.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 
24 #ifndef COM_DAFER45_TBTK_PROPERTY_EXTRACTOR_RPA_SUSCEPTIBILITY
25 #define COM_DAFER45_TBTK_PROPERTY_EXTRACTOR_RPA_SUSCEPTIBILITY
26 
27 #include "TBTK/Solver/RPASusceptibility.h"
28 #include "TBTK/Property/Susceptibility.h"
30 
31 #include <complex>
32 //#include <initializer_list>
33 
34 namespace TBTK{
35 namespace PropertyExtractor{
36 
40 public:
45 
47  virtual void setEnergyWindow(
48  double lowerBound,
49  double upperBound,
50  int resolution
51  );
52 
53  //TODO
54  //This should be extended to become part of the PropertyExtractor
55  //interface once its tested to work well for this specific case.
56  virtual void setEnergyWindow(
57  int lowerFermionicMatsubaraEnergyIndex,
58  int upperFermionicMatsubaraEnergyIndex,
59  int lowerBosonicMatsubaraEnergyIndex,
60  int upperBosonicEnergyIndex
61  );
62 
65 // std::initializer_list<Index> patterns
66  std::vector<Index> patterns
67  );
68 
71 // std::initializer_list<Index> patterns
72  std::vector<Index> patterns
73  );
74 private:
76  static void calculateChargeSusceptibilityCallback(
77  PropertyExtractor *cb_this,
78  void *susceptibility,
79  const Index &index,
80  int offset
81  );
82 
84  static void calculateSpinSusceptibilityCallback(
85  PropertyExtractor *cb_this,
86  void *susceptibility,
87  const Index &index,
88  int offset
89  );
90 
93 
95 // std::vector<std::complex<double>> energies;
96 
100  std::vector<std::complex<double>>
101  > chargeSusceptibilityTree;
102 
106  std::vector<std::complex<double>>
107  > spinSusceptibilityTree;
108 
109  //TODO
110  //These variables should be made part if the PropertyExtractor instead
111  //once its been tested to work well for this specific case.
112 /* enum class EnergyType{Real, Matsubara};
113  EnergyType energyType;
114  int lowerFermionicMatsubaraEnergyIndex;
115  int upperFermionicMatsubaraEnergyIndex;
116  int lowerBosonicMatsubaraEnergyIndex;
117  int upperBosonicMatsubaraEnergyIndex;*/
118 };
119 
120 }; //End of namespace PropertyExtractor
121 }; //End of namespace TBTK
122 
123 #endif
RPASusceptibility(Solver::RPASusceptibility &solver)
virtual void setEnergyWindow(double lowerBound, double upperBound, int resolution)
virtual Property::Susceptibility calculateChargeSusceptibility(std::vector< Index > patterns)
virtual Property::Susceptibility calculateSpinSusceptibility(std::vector< Index > patterns)
Base class PropertyExtractors.
Definition: IndexedDataTree.h:43
Flexible physical index.
Definition: Index.h:69
Definition: RPASusceptibility.h:39
Definition: PropertyExtractor.h:44
Definition: ModelFactory.h:35
Definition: RPASusceptibility.h:39
Property container for the Susceptibility.
Definition: Susceptibility.h:36