53 const Eigen::MatrixXd::ConstRowXpr& Imx_row,
double delta,
55 std::complex<double> delta_eta(delta, eta);
59 DielMxInv.partialPivLu().solve(Imx_row.transpose()) - Imx_row.transpose();
60 return x.dot(Imx_row.transpose());
65 double frequency)
const {
67 double tolerance = 1
e-10;
68 if (e_f < e_m && e_m < frequency) {
70 }
else if (e_f > e_m && e_m > frequency) {
72 }
else if (std::abs(e_m - frequency) < tolerance && e_f > e_m) {
74 }
else if (std::abs(e_m - frequency) < tolerance && e_f < e_m) {
83 Index gw_level)
const {
86 Index rpatotal = rpa_energies.size();
90 double sigma_c_tail = 0.0;
92 Index lumo = homo + 1;
93 double fermi_rpa = (rpa_energies(lumo) + rpa_energies(homo)) / 2.0;
94 const Eigen::MatrixXd& Imx =
Mmn_[gw_level_offset];
96 for (
Index i = 0; i < rpatotal; ++i) {
97 double delta = rpa_energies(i) - frequency;
98 double abs_delta = std::abs(delta);
105 if (std::abs(factor) > 1
e-10) {
110 if (abs_delta > 1
e-10) {
115 return sigma_c + sigma_c_tail;
122 double frequency)
const {
126 return sigma_c_residue + sigma_c_integral;
132 const Eigen::MatrixXd::ConstRowXpr& Imx_row,
double delta,
133 double alpha)
const {
135 double erfc_factor = 0.5 * std::copysign(1.0, delta) *
136 std::exp(std::pow(alpha * delta, 2)) *
137 std::erfc(std::abs(alpha * delta));
140 return value * erfc_factor;
double SigmaGQDiag(double frequency, Index gw_level, double eta) const
void configure(options opt, const RPA &rpa, const Eigen::MatrixXd &kDielMxInv_zero)
Eigen::MatrixXd calculate_epsilon_r(double frequency) const
const Eigen::VectorXd & getRPAInputEnergies() const
double CalcDiagContribution(const Eigen::MatrixXd::ConstRowXpr &Imx_row, double delta, double eta) const
double CalcCorrelationDiagElement(Index gw_level, double frequency) const final
ImaginaryAxisIntegration gq_
double CalcResidueContribution(double frequency, Index gw_level) const
double CalcDiagContributionValue_tail(const Eigen::MatrixXd::ConstRowXpr &Imx_row, double delta, double alpha) const
double CalcResiduePrefactor(double e_f, double e_m, double frequency) const
void PrepareScreening() final
Eigen::MatrixXd kDielMxInv_zero_
base class for all analysis tools
std::string quadrature_scheme
std::string quadrature_scheme