TBTK
Need a break? Support the development by playing Polarity Puzzles
AnalyticalContinuer.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_SOLVER_ANALYTICAL_CONTINUER
25 #define COM_DAFER45_TBTK_SOLVER_ANALYTICAL_CONTINUER
26 
27 #include "TBTK/Communicator.h"
28 #include "TBTK/Model.h"
30 #include "TBTK/Property/SelfEnergy.h"
31 #include "TBTK/Solver/Solver.h"
32 
33 #include <complex>
34 
35 namespace TBTK{
36 namespace Solver{
37 
39 class AnalyticalContinuer : public Solver, public Communicator{
40 public:
42  AnalyticalContinuer();
43 
50  void setEnergyWindow(
51  double lowerBound,
52  double upperBound,
53  int resolution
54  );
55 
59  void setNumeratorDegree(unsigned int numeratorDegree);
60 
65  void setDenominatorDegree(unsigned int denominatorDegree);
66 
71  void setEnergyInfinitesimal(double energyInfinitesimal);
72 
77  void setEnergyShift(std::complex<double> energyShift);
78 
83  void setScaleFactor(double scaleFactor);
84 
90  Property::GreensFunction convert(
91  const Property::GreensFunction &greensFunction,
93  ) const;
94 private:
96  double lowerBound;
97 
99  double upperBound;
100 
102  int resolution;
103 
106  unsigned int numeratorDegree;
107 
110  unsigned int denominatorDegree;
111 
113  static constexpr double ENERGY_INFINITESIMAL = 0;
114 
117  double energyInfinitesimal;
118 
120  std::complex<double> energyShift;
121 
123  double scaleFactor;
124 
136  std::complex<double> getContourDeformation(
137  double energy,
139  ) const;
140 };
141 
142 inline void AnalyticalContinuer::setEnergyWindow(
143  double lowerBound,
144  double upperBound,
145  int resolution
146 ){
147  this->lowerBound = lowerBound;
148  this->upperBound = upperBound;
149  this->resolution = resolution;
150 }
151 
152 inline void AnalyticalContinuer::setNumeratorDegree(
153  unsigned int numeratorDegree
154 ){
155  this->numeratorDegree = numeratorDegree;
156 }
157 
158 inline void AnalyticalContinuer::setDenominatorDegree(
159  unsigned int denominatorDegree
160 ){
161  this->denominatorDegree = denominatorDegree;
162 }
163 
164 inline void AnalyticalContinuer::setEnergyInfinitesimal(
165  double energyInfinitesimal
166 ){
167  this->energyInfinitesimal = energyInfinitesimal;
168 }
169 
170 inline void AnalyticalContinuer::setEnergyShift(
171  std::complex<double> energyShift
172 ){
173  this->energyShift = energyShift;
174 }
175 
176 inline void AnalyticalContinuer::setScaleFactor(double scaleFactor){
177  this->scaleFactor = scaleFactor;
178 }
179 
180 }; //End of namespace Solver
181 }; //End of namespace TBTK
182 
183 #endif
184 
Type
Definition: GreensFunction.h:47
Container of Model related information.
Property container for the Green&#39;s function.
Base class for Solvers.
Definition: Boolean.h:32
Base class for classes that can communicate their status during execution.