24 #ifndef COM_DAFER45_TBTK_SOLVER_SELF_ENERGY
25 #define COM_DAFER45_TBTK_SOLVER_SELF_ENERGY
27 #include "TBTK/BrillouinZone.h"
29 #include "TBTK/Property/InteractionVertex.h"
30 #include "TBTK/RPA/MomentumSpaceContext.h"
36 class SelfEnergy :
public Solver{
40 const RPA::MomentumSpaceContext &momentumSpaceContext,
41 const Property::InteractionVertex &interactionVertex
48 const RPA::MomentumSpaceContext& getMomentumSpaceContext()
const;
53 const Property::InteractionVertex& getInteractionVertex()
const;
59 std::vector<std::complex<double>> calculateSelfEnergy(
61 const std::vector<std::complex<double>> &energies
65 std::vector<std::complex<double>> calculateSelfEnergySelfConsistently(
66 unsigned int numMatsubaraFrequencies,
67 const std::vector<std::complex<double>> &energies
71 const RPA::MomentumSpaceContext &momentumSpaceContext;
74 const Property::InteractionVertex &interactionVertex;
77 int *kMinusQLookupTable;
81 void generateKMinusQLookupTable();
84 template<
bool useKPlusKLookupTable>
85 int getKMinusQLinearIndex(
86 unsigned int meshIndex,
87 const std::vector<double> &k,
95 template<
bool singleSelfEnergyEnergy>
96 void selfEnergyMainLoop(
98 const std::vector<std::complex<double>> &energies,
99 std::vector<std::complex<double>> &result
103 inline const RPA::MomentumSpaceContext& SelfEnergy::getMomentumSpaceContext(
105 return momentumSpaceContext;
108 inline const Property::InteractionVertex& SelfEnergy::getInteractionVertex(
110 return interactionVertex;