Commit efa51261 authored by Henning Janssen's avatar Henning Janssen

Explicitely set imaginary part to 0 instead of implicit integral cutoff

-can lead to loss when smoothing the imaginary part
parent 311c21a6
......@@ -99,13 +99,13 @@ MODULE m_greensfCalcRealPart
IF(i_gf.LT.1 .OR. i_gf.GT.gfinp%n) CYCLE !Make sure to not produce segfaults with mpi
!Get the information of ith current element
l = gfinp%elem(i_gf)%l
lp = gfinp%elem(i_gf)%lp
nType = gfinp%elem(i_gf)%atomType
l = gfinp%elem(i_gf)%l
lp = gfinp%elem(i_gf)%lp
nType = gfinp%elem(i_gf)%atomType
nTypep = gfinp%elem(i_gf)%atomTypep
contourShape = gfinp%contour(gfinp%elem(i_gf)%iContour)%shape
contourShape = gfinp%contour(gfinp%elem(i_gf)%iContour)%shape
l_fixedCutoffset = gfinp%elem(i_gf)%l_fixedCutoffset
fixedCutoff = gfinp%elem(i_gf)%fixedCutoff
fixedCutoff = gfinp%elem(i_gf)%fixedCutoff
CALL uniqueElements_gfinp(gfinp,dummy,ind=i_gf,indUnique=i_elem)
......@@ -124,11 +124,9 @@ MODULE m_greensfCalcRealPart
greensfImagPart%kkintgr_cutoff(i_gf,:,2) = INT((fixedCutoff+ef-eb)/del)+1
ELSE
!For all other elements we just use ef+elup as a hard cutoff
!(maybe give option to specify outside of changing the realAxis grid)
greensfImagPart%kkintgr_cutoff(i_gf,:,1) = 1
greensfImagPart%kkintgr_cutoff(i_gf,:,2) = gfinp%ne
ENDIF
!
!Perform the Kramers-Kronig-Integration if not already calculated
!
......@@ -136,6 +134,14 @@ MODULE m_greensfCalcRealPart
DO jspin = spin_start, spin_end
spin_cut = MERGE(1,jspin,jspin.GT.2)
kkcut = greensfImagPart%kkintgr_cutoff(i_gf,spin_cut,2)
!------------------------------------------------------------
! Set everything above the cutoff in the imaginary part to 0
! We do this explicitely because when we just use the hard cutoff index
! Things might get lost when the imaginary part is smoothed explicitely
!------------------------------------------------------------
IF(kkcut.ne.SIZE(eMesh)) THEN
greensfImagPart%sphavg(kkcut+1:,-l:l,-l:l,i_elem,jspin) = 0.0
ENDIF
DO ipm = 1, 2 !upper or lower half of the complex plane (G(E \pm i delta))
DO m= -l,l
DO mp= -lp,lp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment