Commit 9423d351 authored by Henning Janssen's avatar Henning Janssen

Bugfix in types_greensf

parent 20bd0065
......@@ -40,7 +40,7 @@ MODULE m_greensfTorgue
INTEGER :: lh,mems,mem,mu,m,mp,iz,ipm,lamda,jr,alpha
COMPLEX :: phaseFactor
REAL :: realIntegral, imagIntegral
COMPLEX :: sigma(2,2,3),chi(2,2),torgue_cmplx(3),g_Spin(2,2)
COMPLEX :: sigma(2,2,3),torgue_cmplx(3),g_Spin(2,2)
CHARACTER(LEN=20) :: attributes(5)
REAL, ALLOCATABLE :: bxc(:,:)
......@@ -54,7 +54,7 @@ MODULE m_greensfTorgue
CALL timestart("Green's Function Torgue: init")
!Get Bxc from the total potential (local frame)
ALLOCATE(bxc(SIZE(vTot%mt,1),0:SIZE(vTot%mt,2)-1))
bxc = (vTot%mt(:,:,atomType,1) - vTot%mt(:,:,atomType,2))/2.0
bxc = vTot%mt(:,:,atomType,1) - vTot%mt(:,:,atomType,2)
na=SUM(atoms%neq(:atomType-1))+1
nsym = sym%ntypsy(na)
......@@ -69,15 +69,6 @@ MODULE m_greensfTorgue
sigma(1,1,3)=CMPLX(1.0,0.0)
sigma(2,2,3)=CMPLX(-1.0,0.0)
chi(1,1) = exp(ImagUnit*nococonv%alph(atomType)/2)*cos(nococonv%beta(atomType)/2)
chi(1,2) = -EXP(ImagUnit*nococonv%alph(atomType)/2)*SIN(nococonv%beta(atomType)/2)
chi(2,1) = EXP(-ImagUnit*nococonv%alph(atomType)/2)*SIN(nococonv%beta(atomType)/2)
chi(2,2) = EXP(-ImagUnit*nococonv%alph(atomType)/2)*COS(nococonv%beta(atomType)/2)
!sigma(:,:,1)=MATMUL(CONJG(TRANSPOSE(chi)), MATMUL(sigma(:,:,1),chi))
!sigma(:,:,2)=MATMUL(CONJG(TRANSPOSE(chi)), MATMUL(sigma(:,:,2),chi))
!sigma(:,:,3)=MATMUL(CONJG(TRANSPOSE(chi)), MATMUL(sigma(:,:,3),chi))
CALL timestop("Green's Function Torgue: init")
CALL timestart("Green's Function Torgue: Integration")
torgue_cmplx = cmplx_0
......
......@@ -262,8 +262,7 @@ CONTAINS
END SELECT
ENDDO
ELSE
!Write out a default contour
210 FORMAT(' <contourSemicircle n="', i0, '" eb="', f0.8, '" et="', f0.8, '" alpha="', f0.8, '" label="', a,'"/>')
!Write out a default contour (Semicircle)
WRITE(fileNum, 208) 128, -1.0, 0.0,1.0,"default"
ENDIF
WRITE(fileNum, '(a)') ' </greensFunction>'
......
......@@ -694,10 +694,6 @@ MODULE m_types_greensf
IF(.NOT.ALLOCATED(gmat)) ALLOCATE(gmat(2,2,SIZE(f,1),this%contour%nz),source=cmplx_0)
DO spin = 1, 4
IF(spin>=3 .AND.SIZE(this%uu,4)<3) THEN
gmat(spin1,spin2,:,:) = cmplx_0
CYCLE
ENDIF
IF(spin < 3) THEN
spin1 = spin
spin2 = spin
......@@ -708,6 +704,10 @@ MODULE m_types_greensf
spin1 = 1
spin2 = 2
ENDIF
IF(spin>=3 .AND.SIZE(this%uu,4)<3) THEN
gmat(spin1,spin2,:,:) = cmplx_0
CYCLE
ENDIF
CALL this%getRadial(atoms,m,mp,l_conjg,spin,f,g,flo,temp)
gmat(spin1,spin2,:,:) = temp(:,:)
ENDDO
......@@ -735,10 +735,6 @@ MODULE m_types_greensf
IF(.NOT.ALLOCATED(gmat)) ALLOCATE(gmat(2,2,SIZE(f,1),SIZE(f,1),this%contour%nz),source=cmplx_0)
DO spin = 1, 4
IF(spin>=3 .AND.SIZE(this%uu,4)<3) THEN
gmat(spin1,spin2,:,:,:) = cmplx_0
CYCLE
ENDIF
IF(spin < 3) THEN
spin1 = spin
spin2 = spin
......@@ -749,6 +745,10 @@ MODULE m_types_greensf
spin1 = 1
spin2 = 2
ENDIF
IF(spin>=3 .AND.SIZE(this%uu,4)<3) THEN
gmat(spin1,spin2,:,:,:) = cmplx_0
CYCLE
ENDIF
CALL this%getRadialRadial(atoms,m,mp,l_conjg,spin,f,g,flo,temp)
gmat(spin1,spin2,:,:,:) = temp(:,:,:)
ENDDO
......
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