3
0
mirror of https://github.com/triqs/dft_tools synced 2024-06-13 08:45:30 +02:00

Fixed bug in mesh construction of lattice GF.

This commit is contained in:
Priyanka Seth 2015-04-13 15:11:04 +02:00
parent e387f3ed21
commit 74a19b72df

View File

@ -255,12 +255,15 @@ class SumkDFT:
broadening = 0.01
else: # broadening = 2 * \Delta omega, where \Delta omega is the spacing of omega points
broadening = 2.0 * ( (mesh[1]-mesh[0])/(mesh[2]-1) )
n_iw = 1025 # Default number of Matsubara frequencies
# Are we including Sigma?
if with_Sigma:
if with_dc: sigma_minus_dc = self.add_dc(iw_or_w)
Sigma_imp = getattr(self,"Sigma_imp_"+iw_or_w)
if iw_or_w == "iw": beta = Sigma_imp[0].mesh.beta # override beta if Sigma_iw is present
if iw_or_w == "iw":
beta = Sigma_imp[0].mesh.beta # override beta if Sigma_iw is present
n_iw = len(Sigma_imp[0].mesh)
else:
if (iw_or_w == "w") and (mesh is None):
raise ValueError, "lattice_gf: Give the mesh=(om_min,om_max,n_points) for the lattice GfReFreq."
@ -282,7 +285,7 @@ class SumkDFT:
gf_struct = [ (spn[isp], block_structure[isp]) for isp in range(self.n_spin_blocks[self.SO]) ]
block_ind_list = [block for block,inner in gf_struct]
if iw_or_w == "iw":
glist = lambda : [ GfImFreq(indices=inner,beta=beta) for block,inner in gf_struct]
glist = lambda : [ GfImFreq(indices=inner,beta=beta,n_points=n_iw) for block,inner in gf_struct]
elif iw_or_w == "w":
if with_Sigma:
glist = lambda : [ GfReFreq(indices=inner,mesh=Sigma_imp[0].mesh) for block,inner in gf_struct]