TBTK
Need a break? Support the development by playing Polarity Puzzles
ElectronFluctuationVertex.h
1 /* Copyright 2017 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_ELECTRON_FLUCTUATION_VERTEX
25 #define COM_DAFER45_TBTK_SOLVER_ELECTRON_FLUCTUATION_VERTEX
26 
27 #include "TBTK/BrillouinZone.h"
28 #include "TBTK/IndexedDataTree.h"
29 #include "TBTK/Property/Susceptibility.h"
30 #include "TBTK/MomentumSpaceContext.h"
31 #include "TBTK/Solver/Solver.h"
32 
33 namespace TBTK{
34 namespace Solver{
35 
36 class ElectronFluctuationVertex : public Solver, public Communicator{
37 public:
39  ElectronFluctuationVertex(
40  const MomentumSpaceContext &momentumSpaceContext,
41  const Property::Susceptibility &susceptibility
42  );
43 
45  const MomentumSpaceContext& getMomentumSpaceContext() const;
46 
48  const Property::Susceptibility& getSusceptibility() const;
49 
51  std::vector<std::complex<double>> calculateSelfEnergyVertex(
52  const Index &index
53  );
54 
56  void setLeftInteraction(
57  const std::vector<InteractionAmplitude> &leftInteraction
58  );
59 
61  void setRightInteraction(
62  const std::vector<InteractionAmplitude> &rightInteraction
63  );
64 private:
66  const MomentumSpaceContext &momentumSpaceContext;
67 
69  const Property::Susceptibility &susceptibility;
70 
72  std::vector<InteractionAmplitude> leftInteraction;
73 
75  std::vector<InteractionAmplitude> rightInteraction;
76 
78  void calculateSelfEnergyVertexMainAlgorithm(
79  std::vector<std::complex<double>> &selfEnergyVertex,
80  const Index &index,
81  const Property::Susceptibility &susceptibility,
82  const std::vector<InteractionAmplitude> &uLeft,
83  const std::vector<InteractionAmplitude> &uRight
84  );
85 };
86 
87 inline const MomentumSpaceContext&
88 ElectronFluctuationVertex::getMomentumSpaceContext() const{
89  return momentumSpaceContext;
90 }
91 
92 inline const Property::Susceptibility&
93 ElectronFluctuationVertex::getSusceptibility() const{
94  return susceptibility;
95 }
96 
97 inline void ElectronFluctuationVertex::setLeftInteraction(
98  const std::vector<InteractionAmplitude> &leftInteraction
99 ){
100  this->leftInteraction = leftInteraction;
101 }
102 
103 inline void ElectronFluctuationVertex::setRightInteraction(
104  const std::vector<InteractionAmplitude> &rightInteraction
105 ){
106  this->rightInteraction = rightInteraction;
107 }
108 
109 }; //End of namespace Solver
110 }; //End of namespace TBTK
111 
112 #endif
113 
Data structure for storing data associated with an index.
Base class for Solvers.
Definition: Boolean.h:32