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 
24 #ifndef COM_DAFER45_TBTK_PROPERTY_SELF_ENERGY
25 #define COM_DAFER45_TBTK_PROPERTY_SELF_ENERGY
26 
28 #include "TBTK/TBTKMacros.h"
29 
30 #include <complex>
31 #include <vector>
32 
33 namespace TBTK{
34 namespace Property{
35 
37 class SelfEnergy : public EnergyResolvedProperty<std::complex<double>>{
38 public:
40  SelfEnergy();
41 
52  SelfEnergy(
53  const IndexTree &indexTree,
54  double lowerBound,
55  double upperBound,
56  unsigned int resolution
57  );
58 
70  SelfEnergy(
71  const IndexTree &indexTree,
72  double lowerBound,
73  double upperBound,
74  unsigned int resolution,
75  const std::complex<double> *data
76  );
77 
88  SelfEnergy(
89  const IndexTree &indexTree,
90  int lowerMatsubaraEnergyIndex,
91  int upperMatsubaraEnergyIndex,
92  double fundamentalMatsubaraEnergy
93  );
94 
107  SelfEnergy(
108  const IndexTree &indexTree,
109  int lowerMatsubaraEnergyIndex,
110  int upperMatsubaraEnergyIndex,
111  double fundamentalMatsubaraEnergy,
112  const std::complex<double> *data
113  );
114 
121  SelfEnergy(const std::string &serialization, Mode mode);
122 
124  SelfEnergy& operator+=(const SelfEnergy &rhs);
125 
132  SelfEnergy operator+(const SelfEnergy &rhs) const;
133 
135  SelfEnergy& operator-=(const SelfEnergy &rhs);
136 
143  SelfEnergy operator-(const SelfEnergy &rhs) const;
144 
146  SelfEnergy& operator*=(const std::complex<double> &rhs);
147 
154  SelfEnergy operator*(const std::complex<double> &rhs) const;
155 
163  friend SelfEnergy operator*(
164  const std::complex<double> &lhs,
165  const SelfEnergy &rhs
166  ){
167  return rhs*lhs;
168  }
169 
171  SelfEnergy& operator/=(const std::complex<double> &rhs);
172 
179  SelfEnergy operator/(const std::complex<double> &rhs) const;
180 
182  virtual std::string serialize(Mode mode) const;
183 private:
184 };
185 
186 inline SelfEnergy& SelfEnergy::operator+=(const SelfEnergy &rhs){
188 
189  return *this;
190 }
191 
192 inline SelfEnergy SelfEnergy::operator+(const SelfEnergy &rhs) const{
193  SelfEnergy selfEnergy = *this;
194 
195  return selfEnergy += rhs;
196 }
197 
198 inline SelfEnergy& SelfEnergy::operator-=(const SelfEnergy &rhs){
200 
201  return *this;
202 }
203 
204 inline SelfEnergy SelfEnergy::operator-(const SelfEnergy &rhs) const{
205  SelfEnergy selfEnergy = *this;
206 
207  return selfEnergy -= rhs;
208 }
209 
210 inline SelfEnergy& SelfEnergy::operator*=(const std::complex<double> &rhs){
212 
213  return *this;
214 }
215 
216 inline SelfEnergy SelfEnergy::operator*(
217  const std::complex<double> &rhs
218 ) const{
219  SelfEnergy selfEnergy = *this;
220 
221  return selfEnergy *= rhs;
222 }
223 
224 inline SelfEnergy& SelfEnergy::operator/=(const std::complex<double> &rhs){
226 
227  return *this;
228 }
229 
230 inline SelfEnergy SelfEnergy::operator/(const std::complex<double> &rhs) const{
231  SelfEnergy selfEnergy = *this;
232 
233  return selfEnergy /= rhs;
234 }
235 
236 }; //End namespace Property
237 }; //End namespace TBTK
238 
239 #endif
240 
Precompiler macros.
EnergyResolvedProperty & operator*=(const DataType &rhs)
Definition: EnergyResolvedProperty.h:1379
EnergyResolvedProperty & operator-=(const EnergyResolvedProperty &rhs)
Definition: EnergyResolvedProperty.h:1287
Base class for energy resolved Properties.
Definition: Boolean.h:32
EnergyResolvedProperty & operator/=(const DataType &rhs)
Definition: EnergyResolvedProperty.h:1389
const Vector2d operator*(double lhs, const Vector2d &rhs)
Definition: Vector2d.h:129
EnergyResolvedProperty & operator+=(const EnergyResolvedProperty &rhs)
Definition: EnergyResolvedProperty.h:1195