Commit 1786b4c4 authored by Henning Janssen's avatar Henning Janssen

Add some checks for LOs in gfinp

 -if there is a SCLO in the energy range of the GF you would have to raise the number of states for the cutoff
 instead in the case that a LO is present use a hard or reference cutoff
parent 2533034f
......@@ -88,6 +88,7 @@ MODULE m_types_gfinp
PROCEDURE :: eMesh => eMesh_gfinp
PROCEDURE :: checkRadial => checkRadial_gfinp
PROCEDURE :: checkSphavg => checkSphavg_gfinp
PROCEDURE :: checkforLO => checkforLO_gfinp
PROCEDURE :: addNearestNeighbours => addNearestNeighbours_gfelem
END TYPE t_gfinp
......@@ -875,4 +876,32 @@ CONTAINS
END FUNCTION checkSphavg_gfinp
PURE LOGICAL FUNCTION checkforLO_gfinp(this,atoms,i_gf)
USE m_types_atoms
CLASS(t_gfinp), INTENT(IN) :: this
TYPE(t_atoms), INTENT(IN) :: atoms
INTEGER, INTENT(IN) :: i_gf
INTEGER :: l,lp,atomType,atomTypep,ilo,ilop
l = this%elem(i_gf)%l
lp = this%elem(i_gf)%lp
atomType = this%elem(i_gf)%atomType
atomTypep = this%elem(i_gf)%atomTypep
checkforLO_gfinp = .FALSE.
DO ilo = 1, atoms%nlo(atomType)
IF(atoms%llo(ilo,atomType).NE.l) CYCLE
checkforLO_gfinp = .TRUE.
ENDDO
DO ilop = 1, atoms%nlo(atomTypep)
IF(atoms%llo(ilop,atomType).NE.lp) CYCLE
checkforLO_gfinp = .TRUE.
ENDDO
END FUNCTION checkforLO_gfinp
END MODULE m_types_gfinp
......@@ -79,10 +79,11 @@ MODULE m_greensfCalcRealPart
ELSE
!Is the current element suitable for automatic finding of the cutoff
l_onsite = nType.EQ.nTypep.AND.l.EQ.lp
IF(l_onsite.AND..NOT.l_fixedCutoffset.AND.refCutoff==-1) THEN
IF(l_onsite.AND..NOT.l_fixedCutoffset.AND.refCutoff==-1 .AND..NOT.gfinp%checkforLO(atoms,i_gf)) THEN
!
!Check the integral over the fDOS to define a cutoff for the Kramer-Kronigs-Integration
!
! with LOs I just use a fixed cutoff or reference otherwise I would need to check whether
! the LO lies in the energy boundary and raise the expected number of states accordingly
IF(l_sphavg) THEN
CALL kk_cutoff(greensfImagPart%sphavg(:,:,:,i_elem,:),noco,gfinp%l_mperp,l,input%jspins,&
eMesh,greensfImagPart%kkintgr_cutoff(i_gf,:,:),greensfImagPart%scalingFactorSphavg(i_elem,:))
......
......@@ -39,7 +39,7 @@ MODULE m_greensfPostProcess
INTEGER i_gf,nType,l,lp,atomType,atomTypep,i_elem,indUnique,jspin,ierr
COMPLEX mmpmat(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,gfinp%n,3)
LOGICAL l_sphavg
LOGICAL l_sphavg,l_check
REAL :: torgue(3)
REAL, ALLOCATABLE :: u(:,:,:,:,:,:),udot(:,:,:,:,:,:)
......@@ -142,16 +142,17 @@ MODULE m_greensfPostProcess
l_sphavg = gfinp%elem(i_gf)%l_sphavg
IF(l.NE.lp) CYCLE
IF(atomType.NE.atomTypep) CYCLE
l_check = .NOT.gfinp%checkforLO(atoms,i_gf)
IF(l_sphavg) THEN
CALL occmtx(greensFunction(i_gf),gfinp,input,mmpmat(:,:,i_gf,:),l_write=.TRUE.,check=.TRUE.)
CALL occmtx(greensFunction(i_gf),gfinp,input,mmpmat(:,:,i_gf,:),l_write=.TRUE.,check=l_check)
ELSE IF(.NOT.gfinp%l_mperp) THEN
CALL occmtx(greensFunction(i_gf),gfinp,input,mmpmat(:,:,i_gf,:),&
ddn=usdus%ddn(l,atomType,:),l_write=.TRUE.,check=.TRUE.)
ddn=usdus%ddn(l,atomType,:),l_write=.TRUE.,check=l_check)
ELSE
CALL occmtx(greensFunction(i_gf),gfinp,input,mmpmat(:,:,i_gf,:),&
ddn=usdus%ddn(l,atomType,:),uun21=uun21(l,atomType),&
udn21=udn21(l,atomType),dun21=dun21(l,atomType),&
ddn21=ddn21(l,atomType),l_write=.TRUE.,check=.TRUE.)
ddn21=ddn21(l,atomType),l_write=.TRUE.,check=l_check)
ENDIF
ENDDO
CALL timestop("Green's Function: Occupation")
......
......@@ -184,8 +184,8 @@ MODULE m_occmtx
DO i = 1, 2*ns
WRITE(oUnit,'(14f8.4)') gmat%data_r(i,:)
ENDDO
WRITE(oUnit,'(1x,A,A,A,f8.4)') "Contour(",TRIM(ADJUSTL(contourInp%label)),") Spin-Up trace: ", nup
WRITE(oUnit,'(1x,A,A,A,f8.4)') "Contour(",TRIM(ADJUSTL(contourInp%label)),") Spin-Down trace: ", ndwn
WRITE(oUnit,'(1x,A,I0,A,A,A,f8.4)') "l--> ",l, " Contour(",TRIM(ADJUSTL(contourInp%label)),") Spin-Up trace: ", nup
WRITE(oUnit,'(1x,A,I0,A,A,A,f8.4)') "l--> ",l, " Contour(",TRIM(ADJUSTL(contourInp%label)),") Spin-Down trace: ", ndwn
!Obtain the conversion matrix to the |J,mj> basis (Deprecated)
!CALL cmat%init(.TRUE.,2*ns,2*ns)
......
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