TBTK
Need a break? Support the development by playing Polarity Puzzles
Greens.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_GREENS
25 #define COM_DAFER45_TBTK_SOLVER_GREENS
26 
27 #include "TBTK/Communicator.h"
28 #include "TBTK/Model.h"
30 #include "TBTK/Property/SelfEnergy.h"
31 #include "TBTK/Property/TransmissionRate.h"
32 #include "TBTK/Solver/Solver.h"
33 
34 #include <complex>
35 
36 namespace TBTK{
37 namespace Solver{
38 
40 class Greens : public Solver, public Communicator{
41 public:
43  Greens();
44 
46  virtual ~Greens();
47 
52  void setGreensFunction(const Property::GreensFunction &greensFunction);
53 
57  const Property::GreensFunction& getGreensFunction() const;
58 
67  Property::GreensFunction calculateInteractingGreensFunction(
68  const Property::SelfEnergy &selfEnergy
69  ) const;
70 
77  Property::TransmissionRate calculateTransmissionRate(
78  const Property::SelfEnergy &selfEnergy0,
79  const Property::SelfEnergy &selfEnergy1
80  ) const;
81 private:
83  const Property::GreensFunction *greensFunction;
84 };
85 
86 inline void Greens::setGreensFunction(
87  const Property::GreensFunction &greensFunction
88 ){
89  this->greensFunction = &greensFunction;
90 }
91 
92 inline const Property::GreensFunction& Greens::getGreensFunction() const{
93  return *greensFunction;
94 }
95 
96 }; //End of namespace Solver
97 }; //End of namespace TBTK
98 
99 #endif
100 
Model.h
Container of Model related information.
Solver.h
Base class for Solvers.
GreensFunction.h
Property container for the Green's function.
Communicator.h
Base class for classes that can communicate their status during execution.