Commit b21297b1 authored by Gregor Michalicek's avatar Gregor Michalicek

Comment in subvxc in eigen/eigen.F90 again, adapt subvxc to non-packed storage format

parent 3f874fe8
...@@ -140,8 +140,8 @@ CONTAINS ...@@ -140,8 +140,8 @@ CONTAINS
IF (hybrid%l_addhf) CALL add_Vnonlocal(nk,hybrid,dimension,kpts,jsp,results,xcpot,hmat) IF (hybrid%l_addhf) CALL add_Vnonlocal(nk,hybrid,dimension,kpts,jsp,results,xcpot,hmat)
IF(hybrid%l_subvxc) THEN IF(hybrid%l_subvxc) THEN
!CALL subvxc(lapw,kpts%bk(:,nk),DIMENSION,input,jsp,v%mt(:,0,:,:),atoms,ud,hybrid,enpara%el0,enpara%ello0,& CALL subvxc(lapw,kpts%bk(:,nk),DIMENSION,input,jsp,v%mt(:,0,:,:),atoms,ud,hybrid,enpara%el0,enpara%ello0,&
! sym,atoms%nlotot,kveclo,cell,sphhar,stars,xcpot,mpi,oneD,hamovlp,vx) sym,cell,sphhar,stars,xcpot,mpi,oneD,hmat,vx)
END IF END IF
END IF ! hybrid%l_hybrid END IF ! hybrid%l_hybrid
......
...@@ -80,8 +80,8 @@ MODULE m_add_vnonlocal ...@@ -80,8 +80,8 @@ MODULE m_add_vnonlocal
CALL read_v_x(v_x,kpts%nkpt*(jsp-1) + nk) CALL read_v_x(v_x,kpts%nkpt*(jsp-1) + nk)
! add non-local x-potential to the hamiltonian hmat ! add non-local x-potential to the hamiltonian hmat
DO n=1,v_x%matsize1 DO n = 1, v_x%matsize1
DO nn=1,n DO nn = 1, n
IF (hmat%l_real) THEN IF (hmat%l_real) THEN
hmat%data_r(n,nn) = hmat%data_r(n,nn) - a_ex*v_x%data_r(n,nn) hmat%data_r(n,nn) = hmat%data_r(n,nn) - a_ex*v_x%data_r(n,nn)
ELSE ELSE
......
...@@ -9,7 +9,7 @@ MODULE m_subvxc ...@@ -9,7 +9,7 @@ MODULE m_subvxc
CONTAINS CONTAINS
SUBROUTINE subvxc(lapw,bk,DIMENSION,input,jsp,vr0,atoms,usdus,hybrid,el,ello,sym,& SUBROUTINE subvxc(lapw,bk,DIMENSION,input,jsp,vr0,atoms,usdus,hybrid,el,ello,sym,&
cell,sphhar,stars,xcpot,mpi,oneD,hamovlp,vx) cell,sphhar,stars,xcpot,mpi,oneD,hmat,vx)
USE m_intgr, ONLY : intgr3 USE m_intgr, ONLY : intgr3
...@@ -24,7 +24,7 @@ CONTAINS ...@@ -24,7 +24,7 @@ CONTAINS
IMPLICIT NONE IMPLICIT NONE
TYPE(t_xcpot_inbuild), INTENT(IN) :: xcpot CLASS(t_xcpot), INTENT(IN) :: xcpot
TYPE(t_mpi), INTENT(IN) :: mpi TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_dimension), INTENT(IN) :: dimension TYPE(t_dimension), INTENT(IN) :: dimension
TYPE(t_oneD), INTENT(IN) :: oneD TYPE(t_oneD), INTENT(IN) :: oneD
...@@ -38,7 +38,7 @@ CONTAINS ...@@ -38,7 +38,7 @@ CONTAINS
TYPE(t_lapw), INTENT(IN) :: lapw TYPE(t_lapw), INTENT(IN) :: lapw
TYPE(t_usdus), INTENT(INOUT) :: usdus TYPE(t_usdus), INTENT(INOUT) :: usdus
TYPE(t_potden), INTENT(IN) :: vx TYPE(t_potden), INTENT(IN) :: vx
TYPE(t_hamovlp), INTENT(INOUT) :: hamovlp TYPE(t_mat), INTENT(INOUT) :: hmat
! Scalar Arguments ! Scalar Arguments
INTEGER, INTENT (IN) :: jsp INTEGER, INTENT (IN) :: jsp
...@@ -50,7 +50,7 @@ CONTAINS ...@@ -50,7 +50,7 @@ CONTAINS
REAL, INTENT (IN) :: bk(3) REAL, INTENT (IN) :: bk(3)
! Local Scalars ! Local Scalars
INTEGER :: ic,indx,m,ig1,ig2 INTEGER :: ic,indx,m,ig1,ig2,n,nn
INTEGER :: nlharm,nnbas,typsym,lm INTEGER :: nlharm,nnbas,typsym,lm
INTEGER :: noded,nodeu INTEGER :: noded,nodeu
INTEGER :: nbasf0 INTEGER :: nbasf0
...@@ -80,7 +80,7 @@ CONTAINS ...@@ -80,7 +80,7 @@ CONTAINS
REAL :: bas2(atoms%jmtd,hybrid%maxindx,0:atoms%lmaxd,atoms%ntype) REAL :: bas2(atoms%jmtd,hybrid%maxindx,0:atoms%lmaxd,atoms%ntype)
COMPLEX :: vpw(stars%ng3) COMPLEX :: vpw(stars%ng3)
COMPLEX :: vxc(hamovlp%matsize) COMPLEX :: vxc(hmat%matsize1*(hmat%matsize1+1)/2)
COMPLEX :: vrmat(hybrid%maxlmindx,hybrid%maxlmindx) COMPLEX :: vrmat(hybrid%maxlmindx,hybrid%maxlmindx)
COMPLEX :: carr(hybrid%maxlmindx,DIMENSION%nvd),carr1(DIMENSION%nvd,DIMENSION%nvd) COMPLEX :: carr(hybrid%maxlmindx,DIMENSION%nvd),carr1(DIMENSION%nvd,DIMENSION%nvd)
COMPLEX ,ALLOCATABLE :: ahlp(:,:,:),bhlp(:,:,:) COMPLEX ,ALLOCATABLE :: ahlp(:,:,:),bhlp(:,:,:)
...@@ -382,7 +382,7 @@ CONTAINS ...@@ -382,7 +382,7 @@ CONTAINS
ic = icentry ic = icentry
DO i = 1, lapw%nv(jsp) DO i = 1, lapw%nv(jsp)
ic = ic + 1 ic = ic + 1
IF (hamovlp%l_real) THEN IF (hmat%l_real) THEN
vxc(ic) = vxc(ic) + invsfct * REAL(rr*rc*bascof(i,lm,iatom) *& vxc(ic) = vxc(ic) + invsfct * REAL(rr*rc*bascof(i,lm,iatom) *&
CONJG(bascof_lo(p1,m1,ikvec,ilo,iatom))) CONJG(bascof_lo(p1,m1,ikvec,ilo,iatom)))
ELSE ELSE
...@@ -423,7 +423,7 @@ CONTAINS ...@@ -423,7 +423,7 @@ CONTAINS
rc = CMPLX(0d0,1d0)**(lp-l1) ! adjusts to a/b/ccof-scaling rc = CMPLX(0d0,1d0)**(lp-l1) ! adjusts to a/b/ccof-scaling
IF (hamovlp%l_real) THEN IF (hmat%l_real) THEN
vxc(ic) = vxc(ic) + invsfct * REAL(rr * rc * bascof_lo(pp,mp,ikvecp,ilop,iatom) *& vxc(ic) = vxc(ic) + invsfct * REAL(rr * rc * bascof_lo(pp,mp,ikvecp,ilop,iatom) *&
CONJG(bascof_lo(p1,m1,ikvec,ilo,iatom))) CONJG(bascof_lo(p1,m1,ikvec,ilo,iatom)))
ELSE ELSE
...@@ -462,7 +462,7 @@ CONTAINS ...@@ -462,7 +462,7 @@ CONTAINS
rc = CMPLX(0d0,1d0)**(lp-l1) ! adjusts to a/b/ccof-scaling rc = CMPLX(0d0,1d0)**(lp-l1) ! adjusts to a/b/ccof-scaling
IF (hamovlp%l_real) THEN IF (hmat%l_real) THEN
vxc(ic) = vxc(ic) + invsfct*REAL(rr * rc * bascof_lo(pp,mp,ikvecp,ilop,iatom) *& vxc(ic) = vxc(ic) + invsfct*REAL(rr * rc * bascof_lo(pp,mp,ikvecp,ilop,iatom) *&
CONJG(bascof_lo(p1,m1,ikvec,ilo,iatom))) CONJG(bascof_lo(p1,m1,ikvec,ilo,iatom)))
ELSE ELSE
...@@ -487,16 +487,18 @@ CONTAINS ...@@ -487,16 +487,18 @@ CONTAINS
!initialize weighting factor !initialize weighting factor
a_ex = xcpot%get_exchange_weight() a_ex = xcpot%get_exchange_weight()
IF (hamovlp%l_real) THEN i = 0
DO i = 1, hamovlp%matsize DO n =1, hmat%matsize1
hamovlp%a_r(i) = hamovlp%a_r(i) - a_ex*REAL(vxc(i)) DO nn = 1, n
END DO i = i + 1
ELSE IF (hmat%l_real) THEN
DO i = 1, hamovlp%matsize hmat%data_r(n,nn) = hmat%data_r(n,nn) - a_ex*REAL(vxc(i))
hamovlp%a_c(i) = hamovlp%a_c(i) - a_ex*vxc(i) ELSE
hmat%data_c(n,nn) = hmat%data_c(n,nn) - a_ex*vxc(i)
ENDIF
END DO END DO
END IF END DO
CALL timestop("subvxc") CALL timestop("subvxc")
......
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