Commit 592aa56c authored by Henning Janssen's avatar Henning Janssen

Fixed problem for Greens function DOScontour

-was specified absolutely but handled like it was relative to efermi
parent 02300a33
......@@ -23,7 +23,7 @@ MODULE m_greensfCalcRealPart
IMPLICIT NONE
INTEGER, PARAMETER :: int_method(3) = (/method_direct,method_direct,method_maclaurin/)
INTEGER, PARAMETER :: int_method(3) = [method_direct,method_direct,method_maclaurin]
CONTAINS
......
......@@ -106,6 +106,7 @@ MODULE m_kkintgr
ENDIF
g = 0.0
CALL timestart("kkintgr: integration")
!$OMP PARALLEL DEFAULT(none) &
!$OMP SHARED(nz,ne,method,del,eb,l_conjg) &
......@@ -116,7 +117,7 @@ MODULE m_kkintgr
SELECT CASE(method)
CASE(method_direct)
g(iz) = g_circle(im,ne,MERGE(conjg(ez(iz)),ez(iz),l_conjg),del,eb)
g(iz) = kk_direct(im,ne,MERGE(conjg(ez(iz)),ez(iz),l_conjg),del,eb)
CASE(method_maclaurin, method_deriv)
!Use the previously smoothed version and interpolate after
!Next point to the left
......@@ -161,7 +162,7 @@ MODULE m_kkintgr
END SUBROUTINE kkintgr
COMPLEX FUNCTION g_circle(im,ne,z,del,eb)
COMPLEX FUNCTION kk_direct(im,ne,z,del,eb)
USE m_trapz
......@@ -179,9 +180,9 @@ MODULE m_kkintgr
integrand(i) = 1.0/(z-(i-1)*del-eb) * im(i)
ENDDO
g_circle = -1/pi_const *( trapz(REAL(integrand(:)),del,ne) &
kk_direct = -1/pi_const *( trapz(REAL(integrand(:)),del,ne) &
+ ImagUnit * trapz(AIMAG(integrand(:)),del,ne))
END FUNCTION g_circle
END FUNCTION kk_direct
REAL FUNCTION re_ire(im,ne,ire,method)
......@@ -212,7 +213,7 @@ MODULE m_kkintgr
i = 2*j
ENDIF
y = - 1/pi_const * 2.0 * im(i)/REAL(ire-i)
IF(j.EQ.1.OR.j.EQ.INT(ne/2.0)) y = y/2.0
IF(j.EQ.1 .OR.j.EQ.INT(ne/2.0)) y = y/2.0
re_ire = re_ire + y
ENDDO
......
......@@ -15,6 +15,6 @@ $result+=jt::test_grepnumber("$workdir/out","Contour(RectangleExample) Spin-D
$result+=jt::test_grepnumber("$workdir/out","Contour(default) Spin-Up trace:",": *([^ ]*)",4.0354,0.0005);
$result+=jt::test_grepnumber("$workdir/out","Contour(default) Spin-Down trace:",": *([^ ]*)",1.8764,0.0005);
#DOS (not weighted with fermi function)
$result+=jt::test_grepnumber("$workdir/out","Contour(DOSExample) Spin-Up trace:",": *([^ ]*)",4.9474,0.0005);
$result+=jt::test_grepnumber("$workdir/out","Contour(DOSExample) Spin-Down trace:",": *([^ ]*)",4.8979,0.0005);
jt::stageresult($workdir,$result,"1");
$result+=jt::test_grepnumber("$workdir/out","Contour(DOSExample) Spin-Up trace:",": *([^ ]*)",4.9913,0.0005);
$result+=jt::test_grepnumber("$workdir/out","Contour(DOSExample) Spin-Down trace:",": *([^ ]*)",4.9907,0.0005);
jt::stageresult($workdir,$result,"1"); Contour(DOSExample)
......@@ -186,8 +186,8 @@ MODULE m_types_greensfContourData
!Equidistant contour (without vertical edges)
del = (contourInp%et-contourInp%eb)/REAL(this%nz-1)
DO iz = 1, contourInp%nDOS
this%e(iz) = (iz-1) * del + contourInp%eb + ImagUnit * contourInp%sigmaDOS
DO iz = 1, this%nz
this%e(iz) = (iz-1) * del + contourInp%eb +ef + ImagUnit * contourInp%sigmaDOS
IF(contourInp%l_dosfermi) THEN
this%de(iz) = del * 1.0/(1.0+exp_save((REAL(this%e(iz))-ef)/contourInp%sigmaDOS))
ELSE
......
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