Commit 0e447815 authored by Matthias Redies's avatar Matthias Redies

indent new file

parent 00c67ec6
MODULE m_excepbe
MODULE m_excepbe
!.....-----------------------------------------------------------------
!.....epbe(easy_pbe) exchange-correlation energy density in hartree.
! excepbe - easypbe
!.....------------------------------------------------------------------
CONTAINS
SUBROUTINE excepbe( &
xcpot,jspins,mirm,irmx, &
rh,agr,agru,agrd, &
g2ru,g2rd,gggr,gggru,gggrd, &
exc)
CONTAINS
SUBROUTINE excepbe( &
xcpot,jspins,mirm,irmx, &
rh,agr,agru,agrd, &
g2ru,g2rd,gggr,gggru,gggrd, &
exc)
USE m_easypbe
USE m_types_xcpot_data
USE m_easypbe
USE m_types_xcpot_data
IMPLICIT NONE
IMPLICIT NONE
! .. Arguments ..
TYPE(t_xcpot_data),INTENT(IN)::xcpot
INTEGER, INTENT (IN) :: irmx,jspins,mirm
REAL, INTENT (IN) :: rh(mirm,jspins)
REAL, INTENT (IN) :: agr(mirm),agru(mirm),agrd(mirm)
REAL, INTENT (IN) :: g2ru(mirm),g2rd(mirm),gggr(mirm)
REAL, INTENT (IN) :: gggru(mirm),gggrd(mirm)
REAL, INTENT (OUT) :: exc(mirm)
TYPE(t_xcpot_data),INTENT(IN)::xcpot
INTEGER, INTENT (IN) :: irmx,jspins,mirm
REAL, INTENT (IN) :: rh(mirm,jspins)
REAL, INTENT (IN) :: agr(mirm),agru(mirm),agrd(mirm)
REAL, INTENT (IN) :: g2ru(mirm),g2rd(mirm),gggr(mirm)
REAL, INTENT (IN) :: gggru(mirm),gggrd(mirm)
REAL, INTENT (OUT) :: exc(mirm)
! .. local variables ..
INTEGER :: lcor,lpot,i
REAL :: ro,rou,rod,xedl,cedl,xedg,cedg,xced
REAL :: up,agrup,delgrup,uplap,dn,agrdn,delgrdn,dnlap, &
agrt,delgrt, &
exlsd,vxuplsd,vxdnlsd,eclsd,vcuplsd,vcdnlsd, &
expbe,vxuppbe,vxdnpbe,ecpbe,vcuppbe,vcdnpbe, &
vxupsr,vxdnsr
INTEGER :: lcor,lpot,i
REAL :: ro,rou,rod,xedl,cedl,xedg,cedg,xced
REAL :: up,agrup,delgrup,uplap,dn,agrdn,delgrdn,dnlap, &
agrt,delgrt, &
exlsd,vxuplsd,vxdnlsd,eclsd,vcuplsd,vcdnlsd, &
expbe,vxuppbe,vxdnpbe,ecpbe,vcuppbe,vcdnpbe, &
vxupsr,vxdnsr
REAL, PARAMETER :: sml = 1.e-14
REAL, PARAMETER :: smlc = 2.01e-14
REAL, PARAMETER :: sml = 1.e-14
REAL, PARAMETER :: smlc = 2.01e-14
! OMP parallel do default(private)
! OMP& SHARED(xcpot,jspins,mirm,irmx)
! OMP& SHARED(rh,agr,agru,agrd)
! OMP& SHARED(g2ru,g2rd,gggr,gggru,gggrd)
! OMP& SHARED(exc)
DO i = 1,irmx
DO i = 1,irmx
IF (jspins == 1) THEN
IF (jspins == 1) THEN
rou=rh(i,1)/2
rou=max(rou,sml)
rod=rou
ELSE
ELSE
rou=rh(i,1)
rod=rh(i,jspins)
rou=max(rou,sml)
rod=max(rod,sml)
ENDIF
ENDIF
ro=rou+rod
ro=rou+rod
!.....
! xedl,xedg: exchange energy density (local,grad.exp.) in ry.
! cedl,cedg: exchange energy density (local,grad.expnd.) in ry.
!.....
xedl = 0.0e0
cedl = 0.0e0
xedg = 0.0e0
cedg = 0.0e0
!.....
! xedl,xedg: exchange energy density (local,grad.exp.) in ry.
! cedl,cedg: exchange energy density (local,grad.expnd.) in ry.
!.....
xedl = 0.0e0
cedl = 0.0e0
xedg = 0.0e0
cedg = 0.0e0
IF (ro > smlc) THEN
IF (ro > smlc) THEN
lcor=1
lpot=1
......@@ -82,24 +81,24 @@
delgrt=gggr(i)
CALL easypbe (xcpot, &
up,agrup,delgrup,uplap,dn,agrdn,delgrdn,dnlap, &
agrt,delgrt,lcor,lpot, &
exlsd,vxuplsd,vxdnlsd,eclsd,vcuplsd,vcdnlsd, &
expbe,vxuppbe,vxdnpbe,ecpbe,vcuppbe,vcdnpbe, &
vxupsr,vxdnsr)
up,agrup,delgrup,uplap,dn,agrdn,delgrdn,dnlap, &
agrt,delgrt,lcor,lpot, &
exlsd,vxuplsd,vxdnlsd,eclsd,vcuplsd,vcdnlsd, &
expbe,vxuppbe,vxdnpbe,ecpbe,vcuppbe,vcdnpbe, &
vxupsr,vxdnsr)
xedl=exlsd
cedl=eclsd
xedg=expbe-exlsd
cedg=ecpbe-eclsd
ENDIF ! ro > smlc
ENDIF ! ro > smlc
xced = (xedl+cedl+xedg+cedg)
xced = (xedl+cedl+xedg+cedg)
exc(i) = xced*2 ! in ry
exc(i) = xced*2 ! in ry
ENDDO
ENDDO
! OMP end parallel do
END SUBROUTINE excepbe
END MODULE m_excepbe
END SUBROUTINE excepbe
END MODULE m_excepbe
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