Commit 28e66762 authored by Gregor Michalicek's avatar Gregor Michalicek

Replace to_pulay call with abcof call in cdn/cdnval.F90

For this cdn_mt/abcof.F90 and cdn_mt/abclocdn.F90 had to be adapted
to feature the needed functionality. toPulay is still available in
the code but never called.
parent 2dc221f9
...@@ -724,9 +724,12 @@ CONTAINS ...@@ -724,9 +724,12 @@ CONTAINS
aveccof(3,noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%nat),& aveccof(3,noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%nat),&
bveccof(3,noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%nat),& bveccof(3,noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%nat),&
cveccof(3,-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%nat) ) cveccof(3,-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%nat) )
CALL to_pulay(input,atoms,noccbd,sym, lapw, noco,cell,noccbd,eig,usdus,& CALL abcof(input,atoms,sym, cell,lapw,noccbd,usdus, noco,ispin,oneD,&
ispin,oneD, acof(:,0:,:,ispin),bcof(:,0:,:,ispin),& acof(:,0:,:,ispin),bcof(:,0:,:,ispin),ccof(-atoms%llod:,:,:,:,ispin),zMat,&
e1cof,e2cof,aveccof,bveccof, ccof(-atoms%llod,1,1,1,ispin),acoflo,bcoflo,cveccof,zMat) eig,acoflo,bcoflo,e1cof,e2cof,aveccof,bveccof,cveccof)
! CALL to_pulay(input,atoms,noccbd,sym, lapw, noco,cell,noccbd,eig,usdus,&
! ispin,oneD, acof(:,0:,:,ispin),bcof(:,0:,:,ispin),&
! e1cof,e2cof,aveccof,bveccof, ccof(-atoms%llod,1,1,1,ispin),acoflo,bcoflo,cveccof,zMat)
CALL timestop("cdnval: to_pulay") CALL timestop("cdnval: to_pulay")
ELSE ELSE
......
...@@ -21,17 +21,20 @@ MODULE m_abclocdn ...@@ -21,17 +21,20 @@ MODULE m_abclocdn
!********************************************************************* !*********************************************************************
CONTAINS CONTAINS
SUBROUTINE abclocdn(atoms,sym,noco,lapw,cell,ccchi,iintsp,phase,ylm,& SUBROUTINE abclocdn(atoms,sym,noco,lapw,cell,ccchi,iintsp,phase,ylm,&
ntyp,na,k,nkvec,lo,ne,alo1,blo1,clo1,acof,bcof,ccof,zMat) ntyp,na,k,nkvec,lo,ne,alo1,blo1,clo1,acof,bcof,ccof,zMat,&
! fgp,acoflo,bcoflo,aveccof,bveccof,cveccof)
USE m_types USE m_types
USE m_constants USE m_constants
IMPLICIT NONE IMPLICIT NONE
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_sym),INTENT(IN) :: sym TYPE(t_noco), INTENT(IN) :: noco
TYPE(t_atoms),INTENT(IN) :: atoms TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_lapw),INTENT(IN) :: lapw TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_cell),INTENT(IN) :: cell TYPE(t_lapw), INTENT(IN) :: lapw
TYPE(t_zMat),INTENT(IN) :: zMat TYPE(t_cell), INTENT(IN) :: cell
TYPE(t_zMat), INTENT(IN) :: zMat
! .. ! ..
! .. Scalar Arguments .. ! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: iintsp INTEGER, INTENT (IN) :: iintsp
...@@ -45,10 +48,16 @@ CONTAINS ...@@ -45,10 +48,16 @@ CONTAINS
COMPLEX, INTENT (INOUT) :: acof(:,0:,:)!(nobd,0:dimension%lmd,atoms%nat) COMPLEX, INTENT (INOUT) :: acof(:,0:,:)!(nobd,0:dimension%lmd,atoms%nat)
COMPLEX, INTENT (INOUT) :: bcof(:,0:,:)!(nobd,0:dimension%lmd,atoms%nat) COMPLEX, INTENT (INOUT) :: bcof(:,0:,:)!(nobd,0:dimension%lmd,atoms%nat)
COMPLEX, INTENT (INOUT) :: ccof(-atoms%llod:,:,:,:)!(-atoms%llod:atoms%llod,nobd,atoms%nlod,atoms%nat) COMPLEX, INTENT (INOUT) :: ccof(-atoms%llod:,:,:,:)!(-atoms%llod:atoms%llod,nobd,atoms%nlod,atoms%nat)
REAL, OPTIONAL, INTENT (IN) :: fgp(3)
COMPLEX, OPTIONAL, INTENT (INOUT) :: acoflo(-atoms%llod:,:,:,:)
COMPLEX, OPTIONAL, INTENT (INOUT) :: bcoflo(-atoms%llod:,:,:,:)
COMPLEX, OPTIONAL, INTENT (INOUT) :: aveccof(:,:,0:,:)
COMPLEX, OPTIONAL, INTENT (INOUT) :: bveccof(:,:,0:,:)
COMPLEX, OPTIONAL, INTENT (INOUT) :: cveccof(:,-atoms%llod:,:,:,:)
! .. ! ..
! .. Local Scalars .. ! .. Local Scalars ..
COMPLEX ctmp,term1 COMPLEX ctmp,term1
INTEGER i,l,ll1,lm,nbasf,m INTEGER i,j,l,ll1,lm,nbasf,m
! .. ! ..
! .. ! ..
term1 = 2 * tpi_const/SQRT(cell%omtil) * ((atoms%rmt(ntyp)**2)/2) * phase term1 = 2 * tpi_const/SQRT(cell%omtil) * ((atoms%rmt(ntyp)**2)/2) * phase
...@@ -76,12 +85,20 @@ CONTAINS ...@@ -76,12 +85,20 @@ CONTAINS
ctmp = zMat%z_c(nbasf,i)*term1*CONJG(ylm(ll1+m+1)) ctmp = zMat%z_c(nbasf,i)*term1*CONJG(ylm(ll1+m+1))
ENDIF ENDIF
ENDIF ENDIF
acof(i,lm,na) = acof(i,lm,na) +ctmp*alo1(lo) acof(i,lm,na) = acof(i,lm,na) + ctmp*alo1(lo)
bcof(i,lm,na) = bcof(i,lm,na) +ctmp*blo1(lo) bcof(i,lm,na) = bcof(i,lm,na) + ctmp*blo1(lo)
ccof(m,i,lo,na) = ccof(m,i,lo,na) +ctmp*clo1(lo) ccof(m,i,lo,na) = ccof(m,i,lo,na) + ctmp*clo1(lo)
IF (PRESENT(aveccof)) THEN
acoflo(m,i,lo,na) = acoflo(m,i,lo,na) + ctmp*alo1(lo)
bcoflo(m,i,lo,na) = bcoflo(m,i,lo,na) + ctmp*blo1(lo)
DO j = 1,3
aveccof(j,i,lm,na) = aveccof(j,i,lm,na) + fgp(j)*ctmp*alo1(lo)
bveccof(j,i,lm,na) = bveccof(j,i,lm,na) + fgp(j)*ctmp*blo1(lo)
cveccof(j,m,i,lo,na) = cveccof(j,m,i,lo,na) + fgp(j)*ctmp*clo1(lo)
END DO
END IF
END DO END DO
END DO END DO
END SUBROUTINE abclocdn END SUBROUTINE abclocdn
END MODULE m_abclocdn END MODULE m_abclocdn
This diff is collapsed.
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