Commit 38d6c21d authored by Henning Janssen's avatar Henning Janssen

remove mp loop (mp=m-mv)

parent e13a3dda
......@@ -63,34 +63,34 @@ MODULE m_rhonmt21
cil = mi**(l-lp)
DO jmem = 1,sphhar%nmem(lh,ns)
mv = sphhar%mlh(jmem,lh,ns)
coef1 = cil * sphhar%clnu(jmem,lh,ns)
mp_loop: DO mp = -lp,lp
lmp = lp*(lp+1) + mp
m_loop: DO m = -l,l
coef= CONJG(coef1 * gaunt1(l,lv,lp,m,mv,mp,atoms%lmaxd))
IF (ABS(coef) .LT. 1e-12 ) CYCLE
lm= l*(l+1) + m
natom= 0
DO nn=1,atoms%ntype
llp= lp*(atoms%lmax(nn)+1)+l+1
llpmax = (atoms%lmax(nn)+1)**2
IF(llp.GT.llpmax) CYCLE
nt= natom
DO na= 1,atoms%neq(nn)
nt= nt+1
IF (sym%ntypsy(nt)==ns) THEN
temp(:) = coef * we(:) * eigVecCoeffs%acof(:,lm,nt,1)
uunmt21(llp,lh,nn) = uunmt21(llp,lh,nn) + CPP_BLAS_cdotc(ne,eigVecCoeffs%acof(:,lmp,nt,2),1,temp,1)
dunmt21(llp,lh,nn) = dunmt21(llp,lh,nn) + CPP_BLAS_cdotc(ne,eigVecCoeffs%bcof(:,lmp,nt,2),1,temp,1)
temp(:) = coef * we(:) * eigVecCoeffs%bcof(:,lm,nt,1)
udnmt21(llp,lh,nn) = udnmt21(llp,lh,nn) + CPP_BLAS_cdotc(ne,eigVecCoeffs%acof(:,lmp,nt,2),1,temp,1)
ddnmt21(llp,lh,nn) = ddnmt21(llp,lh,nn) + CPP_BLAS_cdotc(ne,eigVecCoeffs%bcof(:,lmp,nt,2),1,temp,1)
ENDIF ! (sym%ntypsy(nt)==ns)
ENDDO ! na
natom= natom + atoms%neq(nn)
ENDDO ! nn
ENDDO m_loop ! m
ENDDO mp_loop
mp = m - mv
IF(ABS(mp).GT.lp) CYCLE
coef1 = cil * sphhar%clnu(jmem,lh,ns)
lmp = lp*(lp+1) + mp
m_loop: DO m = -l,l
coef= CONJG(coef1 * gaunt1(l,lv,lp,m,mv,mp,atoms%lmaxd))
IF (ABS(coef) .LT. 1e-12 ) CYCLE
lm= l*(l+1) + m
natom= 0
DO nn=1,atoms%ntype
llp= lp*(atoms%lmax(nn)+1)+l+1
llpmax = (atoms%lmax(nn)+1)**2
IF(llp.GT.llpmax) CYCLE
nt= natom
DO na= 1,atoms%neq(nn)
nt= nt+1
IF (sym%ntypsy(nt)==ns) THEN
temp(:) = coef * we(:) * eigVecCoeffs%acof(:,lm,nt,1)
uunmt21(llp,lh,nn) = uunmt21(llp,lh,nn) + CPP_BLAS_cdotc(ne,eigVecCoeffs%acof(:,lmp,nt,2),1,temp,1)
dunmt21(llp,lh,nn) = dunmt21(llp,lh,nn) + CPP_BLAS_cdotc(ne,eigVecCoeffs%bcof(:,lmp,nt,2),1,temp,1)
temp(:) = coef * we(:) * eigVecCoeffs%bcof(:,lm,nt,1)
udnmt21(llp,lh,nn) = udnmt21(llp,lh,nn) + CPP_BLAS_cdotc(ne,eigVecCoeffs%acof(:,lmp,nt,2),1,temp,1)
ddnmt21(llp,lh,nn) = ddnmt21(llp,lh,nn) + CPP_BLAS_cdotc(ne,eigVecCoeffs%bcof(:,lmp,nt,2),1,temp,1)
ENDIF ! (sym%ntypsy(nt)==ns)
ENDDO ! na
natom= natom + atoms%neq(nn)
ENDDO ! nn
ENDDO m_loop ! m
ENDDO ! jmem
ENDDO ! lp
ENDDO ! l
......
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