mirror of
https://github.com/triqs/dft_tools
synced 2024-12-22 04:13:47 +01:00
Make mu and total density real
This commit is contained in:
parent
555084f149
commit
b50ac5b9a3
@ -1723,7 +1723,9 @@ class SumkDFT(object):
|
|||||||
dens = mpi.all_reduce(mpi.world, dens, lambda x, y: x + y)
|
dens = mpi.all_reduce(mpi.world, dens, lambda x, y: x + y)
|
||||||
mpi.barrier()
|
mpi.barrier()
|
||||||
|
|
||||||
return dens
|
if abs(dens.imag) > 1e-20:
|
||||||
|
mpi.report("Warning: Imaginary part in density will be ignored ({})".format(str(abs(dens.imag))))
|
||||||
|
return dens.real
|
||||||
|
|
||||||
def set_mu(self, mu):
|
def set_mu(self, mu):
|
||||||
r"""
|
r"""
|
||||||
|
Loading…
Reference in New Issue
Block a user