mirror of
https://github.com/triqs/dft_tools
synced 2024-11-07 06:33:48 +01:00
Make mu and total density real
This commit is contained in:
parent
1ececb7a4b
commit
9839dcdf9e
@ -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