Commit 60e87a94 authored by Henning Janssen's avatar Henning Janssen

Decouple lower end of energy contour (Semicircle,Rectangle) from ellow in RealAxis

- Boundary effects in Kramers-Kronig Integration can become important in add_selfen if one moves close to the real axis at the boundary
parent e4f42b15
......@@ -750,6 +750,7 @@ CONTAINS
input%gf_n3 = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathB))//'/@n3'))
input%gf_nmatsub = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathB))//'/@nmatsub'))
input%gf_sigma = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathB))//'/@sigma'))
input%gf_eb = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathB))//'/@eb'))
ENDIF
xPathB = TRIM(ADJUSTL(xPathA)) // '/contourSemicircle'
......@@ -758,6 +759,7 @@ CONTAINS
input%gf_mode = 2
input%gf_n = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathB))//'/@n'))
input%gf_et = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathB))//'/@et'))
input%gf_eb = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathB))//'/@eb'))
input%gf_alpha = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathB))//'/@alpha'))
ENDIF
......
......@@ -116,7 +116,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
IF(atoms%n_gf.GT.0.AND.PRESENT(gOnsite)) THEN
!Only calculate the greens function when needed
CALL greensfCoeffs%init(input,lmaxU_const,atoms,noco,results%ef)
CALL gOnsite%e_contour(input,mpi,greensfCoeffs%e_bot,greensfCoeffs%e_top,results%ef)
CALL gOnsite%getEnergyContour(input,mpi,greensfCoeffs%e_bot,greensfCoeffs%e_top,results%ef)
gOnsite%gmmpMat = 0.0
IF(atoms%n_hia.GT.0.AND.mpi%irank==0) hub1%mag_mom = 0.0
ENDIF
......
......@@ -174,6 +174,7 @@
input%gf_n = 128
input%gf_alpha = 1.0
input%gf_et = 0.0
input%gf_eb = 0.0
input%gfTet = .FALSE.
input%minoccDistance = 0.01
input%minmatDistance = 0.001
......
......@@ -237,30 +237,31 @@ CONTAINS
CALL MPI_BCAST(atoms%gfelem(:)%atomType,atoms%n_gf,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(atoms%gfelem(:)%lp,atoms%n_gf,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(atoms%gfelem(:)%atomTypep,atoms%n_gf,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%minoccDistance,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%minmatDistance,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%minoccDistance,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%minmatDistance,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_mode,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_ne,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_sigma,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_sigma,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%l_gf,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%l_dftspinpol,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gfTet,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_anacont,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_anacont,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_dosfermi,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%l_gfsphavg,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%l_gfmperp,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%l_resolvent,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%l_hist,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_ellow,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_elup,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_n,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_n1,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_n2,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_n3,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_nmatsub,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_ellow,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_elup,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_n,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_n1,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_n2,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_n3,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_nmatsub,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_alpha,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_et,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_et,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%gf_eb,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
n = 7*7*3*sym%nop
CALL MPI_BCAST(sym%d_wgn,n,MPI_DOUBLE_COMPLEX,0,mpi%mpi_comm,ierr)
......
......@@ -50,7 +50,7 @@ MODULE m_types_greensf
PROCEDURE :: get => get_gf
PROCEDURE :: set => set_gf
PROCEDURE :: reset => reset_gf
PROCEDURE :: e_contour
PROCEDURE :: getEnergyContour => e_contour
END TYPE t_greensf
......@@ -168,8 +168,10 @@ MODULE m_types_greensf
IF(this%nmatsub > 0) THEN
e1 = ef+input%gf_eb
nz = 0
!Left Vertical part (eb,0) -> (eb,sigma)
!Left Vertical part (e1,0) -> (e1,sigma)
de = this%nmatsub * CMPLX(0.0,sigma)
CALL grule(input%gf_n1,x(1:(input%gf_n1)/2),w(1:(input%gf_n1)/2))
x = -x
......@@ -180,12 +182,12 @@ MODULE m_types_greensf
DO iz = 1, input%gf_n1
nz = nz + 1
IF(nz.GT.this%nz) CALL juDFT_error("Dimension error in energy mesh",calledby="init_e_contour")
this%e(nz) = eb + de + de * x(iz)
this%e(nz) = e1 + de + de * x(iz)
this%de(nz) = w(iz)*de
ENDDO
!Horizontal Part (eb,sigma) -> (et,sigma)
de = (ef-30*input%gf_sigma-eb)/2.0
de = (ef-30*input%gf_sigma-e1)/2.0
CALL grule(input%gf_n2,x(1:(input%gf_n2)/2),w(1:(input%gf_n2)/2))
x = -x
DO i = 1, (input%gf_n2+3)/2-1
......@@ -195,7 +197,7 @@ MODULE m_types_greensf
DO iz = 1, input%gf_n2
nz = nz + 1
IF(nz.GT.this%nz) CALL juDFT_error("Dimension error in energy mesh",calledby="init_e_contour")
this%e(nz) = de*x(iz) + de + eb + 2 * this%nmatsub * ImagUnit * sigma
this%e(nz) = de*x(iz) + de + e1 + 2 * this%nmatsub * ImagUnit * sigma
this%de(nz) = de*w(iz)
ENDDO
......@@ -225,7 +227,7 @@ MODULE m_types_greensf
ELSE IF(this%mode.EQ.2) THEN
!Semicircle
e1 = eb
e1 = ef+input%gf_eb
e2 = ef+input%gf_et
this%nmatsub = 0
......@@ -263,7 +265,7 @@ MODULE m_types_greensf
ELSE
CALL juDFT_error("Invalid mode for energy contour in Green's function calculation", calledby="init_e_contour")
CALL juDFT_error("Invalid mode for energy contour in Green's function calculation", calledby="e_contour")
END IF
......
......@@ -71,7 +71,7 @@ MODULE m_types_setup
TYPE t_gfelementtype
SEQUENCE
!defines the l and atomType elements for given greens function element (used for mapping index in types_greensf)
INTEGER l
INTEGER l
INTEGER lp
INTEGER atomType
INTEGER atomTypep
......@@ -455,6 +455,7 @@ MODULE m_types_setup
INTEGER :: gf_n
REAL :: gf_alpha
REAL :: gf_et
REAL :: gf_eb
INTEGER :: gf_n1
INTEGER :: gf_n2
INTEGER :: gf_n3
......
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