mirror of
https://github.com/triqs/dft_tools
synced 2024-10-15 04:21:41 +02:00
Fixed bug in mesh construction of lattice GF.
This commit is contained in:
parent
e387f3ed21
commit
74a19b72df
@ -255,12 +255,15 @@ class SumkDFT:
|
|||||||
broadening = 0.01
|
broadening = 0.01
|
||||||
else: # broadening = 2 * \Delta omega, where \Delta omega is the spacing of omega points
|
else: # broadening = 2 * \Delta omega, where \Delta omega is the spacing of omega points
|
||||||
broadening = 2.0 * ( (mesh[1]-mesh[0])/(mesh[2]-1) )
|
broadening = 2.0 * ( (mesh[1]-mesh[0])/(mesh[2]-1) )
|
||||||
|
n_iw = 1025 # Default number of Matsubara frequencies
|
||||||
|
|
||||||
# Are we including Sigma?
|
# Are we including Sigma?
|
||||||
if with_Sigma:
|
if with_Sigma:
|
||||||
if with_dc: sigma_minus_dc = self.add_dc(iw_or_w)
|
if with_dc: sigma_minus_dc = self.add_dc(iw_or_w)
|
||||||
Sigma_imp = getattr(self,"Sigma_imp_"+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:
|
else:
|
||||||
if (iw_or_w == "w") and (mesh is None):
|
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."
|
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]) ]
|
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]
|
block_ind_list = [block for block,inner in gf_struct]
|
||||||
if iw_or_w == "iw":
|
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":
|
elif iw_or_w == "w":
|
||||||
if with_Sigma:
|
if with_Sigma:
|
||||||
glist = lambda : [ GfReFreq(indices=inner,mesh=Sigma_imp[0].mesh) for block,inner in gf_struct]
|
glist = lambda : [ GfReFreq(indices=inner,mesh=Sigma_imp[0].mesh) for block,inner in gf_struct]
|
||||||
|
Loading…
Reference in New Issue
Block a user