24 #ifndef COM_DAFER45_TBTK_Z_FACTOR_CALCULATOR
25 #define COM_DAFER45_TBTK_Z_FACTOR_CALCULATOR
27 #include "TBTK/BrillouinZone.h"
29 #include "TBTK/RPA/SelfEnergyCalculator.h"
33 class ZFactorCalculator{
37 const RPA::MomentumSpaceContext &momentumSpaceContext,
38 unsigned int numWorkers = 1
45 void setNumSummationEnergies(
unsigned int numSummationEnergies);
51 std::vector<std::complex<double>> calculateZFactor(
52 const std::vector<double> &k
61 void setU(std::complex<double> U);
64 void setUp(std::complex<double> Up);
67 void setJ(std::complex<double> J);
70 void setJp(std::complex<double> Jp);
76 void saveSusceptibilities(
const std::string &filename)
const;
79 void loadSusceptibilities(
const std::string &filename);
82 SelfEnergyCalculator selfEnergyCalculator;
85 unsigned int numSummationEnergies;
92 std::complex<double> *matrix,
93 unsigned int dimensions
97 void multiplyMatrices(
98 std::complex<double> *matrix1,
99 std::complex<double> *matrix2,
100 std::complex<double> *result,
101 unsigned int dimensions
106 std::complex<double> *matrix,
107 unsigned int dimensions
111 std::complex<double> U, Up, J, Jp;
114 inline void ZFactorCalculator::setNumSummationEnergies(
115 unsigned int numSummationEnergies
117 this->numSummationEnergies = numSummationEnergies;
120 inline void ZFactorCalculator::setU(std::complex<double> U){
122 selfEnergyCalculator.setU(U);
125 inline void ZFactorCalculator::setUp(std::complex<double> Up){
127 selfEnergyCalculator.setUp(Up);
130 inline void ZFactorCalculator::setJ(std::complex<double> J){
132 selfEnergyCalculator.setJ(J);
135 inline void ZFactorCalculator::setJp(std::complex<double> Jp){
137 selfEnergyCalculator.setJp(Jp);
146 inline void ZFactorCalculator::saveSusceptibilities(
147 const std::string &filename
149 selfEnergyCalculator.saveSusceptibilities(filename);
152 inline void ZFactorCalculator::loadSusceptibilities(
153 const std::string &filename
155 selfEnergyCalculator.loadSusceptibilities(filename);