3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-25 05:43:40 +01:00

Fix in off-diagonal elements of density()

This should fix the bug noticed by Leonid in off-diagonal
elements of the density matrix.

  modified:   triqs/gfs/local/functions.cpp
This commit is contained in:
Michel Ferrero 2014-03-08 13:46:31 +01:00
parent 2f2044e74b
commit 5805c7c3aa

View File

@ -55,9 +55,8 @@ namespace triqs { namespace gfs {
}
for (size_t n1=0; n1<N1;n1++)
for (size_t n2=0; n2<N2;n2++) {
for (size_t n2=n1; n2<N2;n2++) {
dens_part(n1,n2) = dens_part(n1,n2) + (G.mesh().positive_only()? ( real(dens_part(n2,n1)) - I * imag(dens_part(n2,n1)) ) : 0) + dens_tail(n1,n2);
// ?? STRANGE ??
dens_part(n2,n1) = real(dens_part(n1,n2)) - I * imag(dens_part(n1,n2));
}