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 
24 #ifndef COM_DAFER45_TBTK_SOLVER_SELF_ENERGY2
25 #define COM_DAFER45_TBTK_SOLVER_SELF_ENERGY2
26 
28 #include "TBTK/Property/InteractionVertex.h"
29 #include "TBTK/Property/SelfEnergy.h"
30 #include "TBTK/MomentumSpaceContext.h"
31 #include "TBTK/Solver/Solver.h"
32 
33 namespace TBTK{
34 namespace Solver{
35 
36 class SelfEnergy2 : public Solver, public Communicator{
37 public:
39  SelfEnergy2(
40  const MomentumSpaceContext &momentumSpaceContext,
41  const Property::InteractionVertex &interactionVertex,
42  const Property::GreensFunction &greensFunction
43  );
44 
46  const MomentumSpaceContext& getMomentumSpaceContext() const;
47 
51  const Property::InteractionVertex& getInteractionVertex() const;
52 
56  const Property::GreensFunction& getGreensFunction() const;
57 
59  std::vector<std::complex<double>> calculateSelfEnergy(
60  const Index &index,
61  int lowerMatsubaraEnergyIndex,
62  int upperMatsubaraEnergyIndex
63  );
64 
66  Property::SelfEnergy calculateSelfEnergyAllBlocks(
67  const Index &index,
68  int lowerMatsubaraEnergyIndex,
69  int upperMatsubaraEnergyIndex
70  );
71 private:
73  const MomentumSpaceContext &momentumSpaceContext;
74 
76  const Property::InteractionVertex &interactionVertex;
77 
79  const Property::GreensFunction &greensFunction;
80 
82  unsigned int getNumIntraBlockIndices();
83 
85  std::vector<Index> getIntraBlockIndexList();
86 };
87 
88 inline const MomentumSpaceContext& SelfEnergy2::getMomentumSpaceContext(
89 ) const{
90  return momentumSpaceContext;
91 }
92 
93 inline const Property::InteractionVertex& SelfEnergy2::getInteractionVertex(
94 ) const{
95  return interactionVertex;
96 }
97 
98 inline const Property::GreensFunction& SelfEnergy2::getGreensFunction(
99 ) const{
100  return greensFunction;
101 }
102 
103 }; //End of namespace Solver
104 }; //End of namespace TBTK
105 
106 #endif
107 
Property container for the Green&#39;s function.
Base class for Solvers.
Definition: Boolean.h:32