22
33namespace cppdlr2d {
44
5- nda::vector<dcomplex> polarization (double beta, double lambda, double eps, cppdlr::imtime_ops const &itops, cppdlr::imfreq_ops const &ifops_fer,
5+ nda::vector<dcomplex> polarization (double beta, double lambda, double eps, cppdlr::imtime_ops const & /* itops*/ , cppdlr::imfreq_ops const &ifops_fer,
66 cppdlr::imfreq_ops const &ifops_bos, nda::array_const_view<dcomplex, 1 > fc,
77 nda::array_const_view<dcomplex, 1 > gc, nda::array_const_view<dcomplex, 3 > lambc,
88 nda::array_const_view<dcomplex, 1 > lambc_sing) {
@@ -31,17 +31,11 @@ namespace cppdlr2d {
3131
3232 // Compute 1/(i Omega_m - omega_k)
3333 auto kkif = nda::array<dcomplex, 2 >(r, r);
34- auto iom = 2 * dlr_if_bos * pi * 1i;
3534 for (int j = 0 ; j < r; ++j) {
36- for (int k = 0 ; k < r; ++k) {
37- // kkif(j, k) = beta / (iom(j) - dlr_rf(k));
38- kkif (j, k) = beta * k_if_boson (dlr_if_bos (j), dlr_rf (k));
39- }
35+ for (int k = 0 ; k < r; ++k) { kkif (j, k) = beta * k_if_boson (dlr_if_bos (j), dlr_rf (k)); }
4036 }
4137
4238 // Compute F(tau) and G(tau)
43- // auto fit = itops.coefs2vals(fc);
44- // auto git = itops.coefs2vals(gc);
4539 auto fit = matvecmul (cf2itfine, fc);
4640 auto git = matvecmul (cf2itfine, gc);
4741
@@ -105,11 +99,9 @@ namespace cppdlr2d {
10599 auto tmp5 = matvecmul (tmp2, lambc_sing);
106100 auto tmp6 = cffine2if * itops2.vals2coefs (tmp5);
107101
108- int m0idx = 0 ;
109102 for (int j = 0 ; j < r; ++j) {
110103 if (dlr_if_bos (j) == 0 ) {
111104 pol (j) += beta * beta * tmp6 (j);
112- m0idx = j;
113105 break ;
114106 }
115107 }
@@ -122,7 +114,7 @@ namespace cppdlr2d {
122114 return pol;
123115 }
124116
125- nda::vector<dcomplex> polarization_3term (double beta, double lambda, double eps, cppdlr::imtime_ops const &itops,
117+ nda::vector<dcomplex> polarization_3term (double beta, double lambda, double eps, cppdlr::imtime_ops const & /* itops*/ ,
126118 cppdlr::imfreq_ops const &ifops_fer, cppdlr::imfreq_ops const &ifops_bos,
127119 nda::array_const_view<dcomplex, 1 > fc, nda::array_const_view<dcomplex, 1 > gc,
128120 nda::array_const_view<dcomplex, 3 > lambc, nda::array_const_view<dcomplex, 1 > lambc_sing) {
@@ -151,17 +143,11 @@ namespace cppdlr2d {
151143
152144 // Compute 1/(i Omega_m - omega_k)
153145 auto kkif = nda::array<dcomplex, 2 >(r, r);
154- auto iom = 2 * dlr_if_bos * pi * 1i;
155146 for (int j = 0 ; j < r; ++j) {
156- for (int k = 0 ; k < r; ++k) {
157- // kkif(j, k) = beta / (iom(j) - dlr_rf(k));
158- kkif (j, k) = beta * k_if_boson (dlr_if_bos (j), dlr_rf (k));
159- }
147+ for (int k = 0 ; k < r; ++k) { kkif (j, k) = beta * k_if_boson (dlr_if_bos (j), dlr_rf (k)); }
160148 }
161149
162150 // Compute F(tau) and G(tau)
163- // auto fit = itops.coefs2vals(fc);
164- // auto git = itops.coefs2vals(gc);
165151 auto fit = matvecmul (cf2itfine, fc);
166152 auto git = matvecmul (cf2itfine, gc);
167153
@@ -215,11 +201,9 @@ namespace cppdlr2d {
215201 auto tmp5 = matvecmul (tmp2, lambc_sing);
216202 auto tmp6 = cffine2if * itops2.vals2coefs (tmp5);
217203
218- int m0idx = 0 ;
219204 for (int j = 0 ; j < r; ++j) {
220205 if (dlr_if_bos (j) == 0 ) {
221206 pol (j) += beta * beta * tmp6 (j);
222- m0idx = j;
223207 break ;
224208 }
225209 }
@@ -243,7 +227,6 @@ namespace cppdlr2d {
243227 auto dlr_if_fer = ifops_fer.get_ifnodes ();
244228 auto dlr_if_bos = ifops_bos.get_ifnodes ();
245229
246- auto nu_dlr = ((2 * dlr_if_fer + 1 ) * pi * 1i) / beta;
247230 auto om_dlr = (2 * dlr_if_bos * pi * 1i) / beta;
248231
249232 // Prepare some objects
@@ -507,9 +490,8 @@ namespace cppdlr2d {
507490
508491 // Evaluate summand at fermionic DLR imag freq nodes
509492
510- auto h = nda::vector<dcomplex>(r);
511- std::complex <double > nu = 0 ;
512- int channel = 1 ;
493+ auto h = nda::vector<dcomplex>(r);
494+ int channel = 1 ;
513495 for (int k = 0 ; k < r; ++k) {
514496 // h(k) = hubbg(u, nu1) * hubbg(u, -nu1) * hubbvert(u, beta, nu1, -nu1);
515497 h (k) = ifops_fer.coefs2eval (beta, fc, dlr_if_fer (k)) * ifops_fer.coefs2eval (beta, gc, -dlr_if_fer (k) - 1 )
@@ -524,12 +506,8 @@ namespace cppdlr2d {
524506 for (int k = 0 ; k < r; ++k) { pol0 += hc (k) * k_it (0.0 , ej (k), beta); }
525507
526508 // Fill in polarization at i omega_n = 0
527- int m0idx = 0 ;
528509 for (int m = 0 ; m < r; ++m) {
529- if (dlr_if_bos (m) == 0 ) {
530- m0idx = m;
531- pol (m) = pol0;
532- }
510+ if (dlr_if_bos (m) == 0 ) { pol (m) = pol0; }
533511 }
534512
535513 return pol;
0 commit comments