Commit aef7be8e authored by Gregor Michalicek's avatar Gregor Michalicek

Introduce more subroutines to t_denCoeffsOffdiag type

parent 57b086ad
...@@ -59,10 +59,6 @@ CONTAINS ...@@ -59,10 +59,6 @@ CONTAINS
USE m_forcea12 USE m_forcea12
USE m_forcea21 USE m_forcea21
USE m_checkdopall USE m_checkdopall
USE m_int21 ! integrate (spin) off-diagonal radial functions
USE m_int21lo ! -"- for u_lo
USE m_rhomt21 ! calculate (spin) off-diagonal MT-density coeff's
USE m_rhonmt21 ! -"- non-MT-density coeff's
USE m_cdnmt ! calculate the density and orbital moments etc. USE m_cdnmt ! calculate the density and orbital moments etc.
USE m_orbmom ! coeffd for orbital moments USE m_orbmom ! coeffd for orbital moments
USE m_qmtsl ! These subroutines divide the input%film into vacuum%layers USE m_qmtsl ! These subroutines divide the input%film into vacuum%layers
...@@ -82,7 +78,7 @@ CONTAINS ...@@ -82,7 +78,7 @@ CONTAINS
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
TYPE(t_enpara), INTENT(INOUT) :: enpara TYPE(t_enpara), INTENT(IN) :: enpara
TYPE(t_obsolete), INTENT(IN) :: obsolete TYPE(t_obsolete), INTENT(IN) :: obsolete
TYPE(t_banddos), INTENT(IN) :: banddos TYPE(t_banddos), INTENT(IN) :: banddos
TYPE(t_sliceplot), INTENT(IN) :: sliceplot TYPE(t_sliceplot), INTENT(IN) :: sliceplot
...@@ -113,10 +109,10 @@ CONTAINS ...@@ -113,10 +109,10 @@ CONTAINS
! .. Local Scalars .. ! .. Local Scalars ..
INTEGER :: ikpt,jsp_start,jsp_end,ispin,jsp INTEGER :: ikpt,jsp_start,jsp_end,ispin,jsp
INTEGER :: i,ie,ivac,j,k,l,n,ilo,nbands,noccbd INTEGER :: i,ie,ivac,j,k,l,ilo,nbands,noccbd,iType
INTEGER :: skip_t,skip_tt INTEGER :: skip_t,skip_tt
INTEGER :: nStart,nEnd,nbasfcn INTEGER :: nStart,nEnd,nbasfcn
LOGICAL :: l_evp,l_orbcomprot,l_real, l_write LOGICAL :: l_orbcomprot,l_real, l_write
! ...Local Arrays .. ! ...Local Arrays ..
INTEGER, ALLOCATABLE :: jsym(:),ksym(:) INTEGER, ALLOCATABLE :: jsym(:),ksym(:)
...@@ -186,24 +182,17 @@ CONTAINS ...@@ -186,24 +182,17 @@ CONTAINS
l_write = input%cdinf.AND.mpi%irank==0 l_write = input%cdinf.AND.mpi%irank==0
DO n = 1,atoms%ntype DO iType = 1,atoms%ntype
DO ispin = jsp_start, jsp_end DO ispin = jsp_start, jsp_end
CALL genMTBasis(atoms,enpara,vTot,mpi,n,ispin,l_write,usdus,f(:,:,0:,ispin),g(:,:,0:,ispin),flo(:,:,:,ispin)) CALL genMTBasis(atoms,enpara,vTot,mpi,iType,ispin,l_write,usdus,f(:,:,0:,ispin),g(:,:,0:,ispin),flo(:,:,:,ispin))
END DO END DO
IF (noco%l_mperp) THEN IF (noco%l_mperp) CALL denCoeffsOffdiag%addRadFunScalarProducts(atoms,f,g,flo,iType)
DO l = 0,atoms%lmax(n)
CALL int_21(f,g,atoms,n,l,denCoeffsOffdiag)
END DO
DO ilo = 1, atoms%nlo(n)
CALL int_21lo(f,g,atoms,n,flo,ilo,denCoeffsOffdiag)
END DO
END IF
IF (banddos%l_mcd) CALL mcd_init(atoms,input,dimension,vTot%mt(:,0,:,:),g,f,mcd,n,jspin) IF (banddos%l_mcd) CALL mcd_init(atoms,input,dimension,vTot%mt(:,0,:,:),g,f,mcd,iType,jspin)
IF(l_cs) CALL corespec_rme(atoms,input,n,dimension%nstd,input%jspins,jspin,results%ef,& IF(l_cs) CALL corespec_rme(atoms,input,iType,dimension%nstd,input%jspins,jspin,results%ef,&
dimension%msh,vTot%mt(:,0,:,:),f,g) dimension%msh,vTot%mt(:,0,:,:),f,g)
END DO END DO
DEALLOCATE (f,g,flo) DEALLOCATE (f,g,flo)
...@@ -351,10 +340,7 @@ CONTAINS ...@@ -351,10 +340,7 @@ CONTAINS
END IF END IF
END DO !---> end loop over ispin END DO !---> end loop over ispin
IF (noco%l_mperp) THEN IF (noco%l_mperp) CALL denCoeffsOffdiag%calcCoefficients(atoms,sphhar,sym,eigVecCoeffs,we,noccbd)
CALL rhomt21(atoms,we,noccbd,eigVecCoeffs,denCoeffsOffdiag)
IF (denCoeffsOffdiag%l_fmpl) CALL rhonmt21(atoms,sphhar,we,noccbd,sym,eigVecCoeffs,denCoeffsOffdiag)
END IF
199 CONTINUE 199 CONTINUE
IF ((banddos%dos .OR. banddos%vacdos .OR. input%cdinf) ) THEN IF ((banddos%dos .OR. banddos%vacdos .OR. input%cdinf) ) THEN
......
...@@ -9,25 +9,13 @@ MODULE m_int21 ...@@ -9,25 +9,13 @@ MODULE m_int21
!----------------------------------------------------------- !-----------------------------------------------------------
CONTAINS CONTAINS
SUBROUTINE int_21(f,g,atoms,ityp,l,denCoeffsOffdiag) SUBROUTINE int_21(f,g,atoms,ityp,l,uu21n,ud21n,du21n,dd21n)
USE m_types
IMPLICIT NONE
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_denCoeffsOffdiag), INTENT(INOUT) :: denCoeffsOffdiag
INTEGER, INTENT (IN) :: l,ityp
REAL, INTENT (IN) :: f(:,:,0:,:)!(atoms%jmtd,2,0:atoms%lmaxd,dimension%jspd)
REAL, INTENT (IN) :: g(:,:,0:,:)!(atoms%jmtd,2,0:atoms%lmaxd,dimension%jspd)
CALL int_21_arrays(f,g,atoms,ityp,l,denCoeffsOffdiag%uu21n,denCoeffsOffdiag%ud21n,&
denCoeffsOffdiag%du21n,denCoeffsOffdiag%dd21n)
END SUBROUTINE int_21
SUBROUTINE int_21_arrays(f,g,atoms,ityp,l,uu21n,ud21n,du21n,dd21n)
USE m_intgr, ONLY : intgr3 USE m_intgr, ONLY : intgr3
USE m_types USE m_types_setup
IMPLICIT NONE IMPLICIT NONE
TYPE(t_atoms), INTENT(IN) :: atoms TYPE(t_atoms), INTENT(IN) :: atoms
INTEGER, INTENT (IN) :: l,ityp INTEGER, INTENT (IN) :: l,ityp
...@@ -55,5 +43,6 @@ CONTAINS ...@@ -55,5 +43,6 @@ CONTAINS
+ g(:atoms%jri(ityp),2,l,2)*g(:atoms%jri(ityp),2,l,1) + g(:atoms%jri(ityp),2,l,2)*g(:atoms%jri(ityp),2,l,1)
CALL intgr3(uu_tmp,atoms%rmsh(:,ityp),atoms%dx(ityp),atoms%jri(ityp),dd21n(l,ityp)) CALL intgr3(uu_tmp,atoms%rmsh(:,ityp),atoms%dx(ityp),atoms%jri(ityp),dd21n(l,ityp))
END SUBROUTINE int_21_arrays END SUBROUTINE int_21
END MODULE m_int21 END MODULE m_int21
...@@ -10,14 +10,17 @@ MODULE m_int21lo ...@@ -10,14 +10,17 @@ MODULE m_int21lo
! !
!----------------------------------------------------------- !-----------------------------------------------------------
CONTAINS CONTAINS
SUBROUTINE int_21lo(f,g,atoms,n, flo,ilo,denCoeffsOffdiag) SUBROUTINE int_21lo(f,g,atoms,n,flo,ilo,uulo21n,ulou21n,dulo21n,ulod21n,uloulop21n)
USE m_intgr, ONLY : intgr3 USE m_intgr, ONLY : intgr3
USE m_types USE m_types_setup
USE m_types
IMPLICIT NONE IMPLICIT NONE
TYPE(t_atoms), INTENT(IN) :: atoms TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_denCoeffsOffdiag), INTENT(INOUT) :: denCoeffsOffdiag REAL, INTENT(INOUT) :: uulo21n(atoms%nlod,atoms%ntype)
REAL, INTENT(INOUT) :: ulou21n(atoms%nlod,atoms%ntype)
REAL, INTENT(INOUT) :: dulo21n(atoms%nlod,atoms%ntype)
REAL, INTENT(INOUT) :: ulod21n(atoms%nlod,atoms%ntype)
REAL, INTENT(INOUT) :: uloulop21n(atoms%nlod,atoms%nlod,atoms%ntype)
! .. ! ..
! .. Scalar Arguments .. ! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: ilo,n INTEGER, INTENT (IN) :: ilo,n
...@@ -38,22 +41,22 @@ CONTAINS ...@@ -38,22 +41,22 @@ CONTAINS
DO iri = 1, atoms%jri(n) DO iri = 1, atoms%jri(n)
uu_tmp(iri) = f(iri,1,l,2)*flo(iri,1,ilo,1)+ f(iri,2,l,2)*flo(iri,2,ilo,1) uu_tmp(iri) = f(iri,1,l,2)*flo(iri,1,ilo,1)+ f(iri,2,l,2)*flo(iri,2,ilo,1)
ENDDO ENDDO
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),denCoeffsOffdiag%uulo21n(ilo,n)) CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),uulo21n(ilo,n))
DO iri = 1, atoms%jri(n) DO iri = 1, atoms%jri(n)
uu_tmp(iri) = f(iri,1,l,1)*flo(iri,1,ilo,2)+ f(iri,2,l,1)*flo(iri,2,ilo,2) uu_tmp(iri) = f(iri,1,l,1)*flo(iri,1,ilo,2)+ f(iri,2,l,1)*flo(iri,2,ilo,2)
ENDDO ENDDO
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),denCoeffsOffdiag%ulou21n(ilo,n)) CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),ulou21n(ilo,n))
! !
! --> norm of product of du and ulo: ! --> norm of product of du and ulo:
! !
DO iri = 1, atoms%jri(n) DO iri = 1, atoms%jri(n)
uu_tmp(iri) = g(iri,1,l,2)*flo(iri,1,ilo,1) + g(iri,2,l,2)*flo(iri,2,ilo,1) uu_tmp(iri) = g(iri,1,l,2)*flo(iri,1,ilo,1) + g(iri,2,l,2)*flo(iri,2,ilo,1)
ENDDO ENDDO
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),denCoeffsOffdiag%dulo21n(ilo,n)) CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),dulo21n(ilo,n))
DO iri = 1, atoms%jri(n) DO iri = 1, atoms%jri(n)
uu_tmp(iri) = g(iri,1,l,1)*flo(iri,1,ilo,2) + g(iri,2,l,1)*flo(iri,2,ilo,2) uu_tmp(iri) = g(iri,1,l,1)*flo(iri,1,ilo,2) + g(iri,2,l,1)*flo(iri,2,ilo,2)
ENDDO ENDDO
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),denCoeffsOffdiag%ulod21n(ilo,n)) CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),ulod21n(ilo,n))
! !
! --> norm of product of ulo and ulo': ! --> norm of product of ulo and ulo':
! !
...@@ -63,10 +66,10 @@ CONTAINS ...@@ -63,10 +66,10 @@ CONTAINS
DO iri = 1, atoms%jri(n) DO iri = 1, atoms%jri(n)
uu_tmp(iri) = flo(iri,1,ilo,2)*flo(iri,1,ilop,1) + flo(iri,2,ilo,2)*flo(iri,2,ilop,1) uu_tmp(iri) = flo(iri,1,ilo,2)*flo(iri,1,ilop,1) + flo(iri,2,ilo,2)*flo(iri,2,ilop,1)
ENDDO ENDDO
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),denCoeffsOffdiag%uloulop21n(ilo,ilop,n)) CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),uloulop21n(ilo,ilop,n))
ELSE ELSE
denCoeffsOffdiag%uloulop21n(ilo,ilop,n) = 0.0 uloulop21n(ilo,ilop,n) = 0.0
ENDIF ENDIF
ENDDO ENDDO
......
...@@ -7,22 +7,33 @@ MODULE m_rhomt21 ...@@ -7,22 +7,33 @@ MODULE m_rhomt21
! FF ! FF
! *************************************************************** ! ***************************************************************
CONTAINS CONTAINS
SUBROUTINE rhomt21(atoms,we,ne,eigVecCoeffs,denCoeffsOffdiag) SUBROUTINE rhomt21(atoms,we,ne,eigVecCoeffs,uu21,ud21,du21,dd21,uulo21,dulo21,ulou21,ulod21,uloulop21)
USE m_types_setup
USE m_types_cdnval
USE m_types
IMPLICIT NONE IMPLICIT NONE
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_eigVecCoeffs),INTENT(IN) :: eigVecCoeffs TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_denCoeffsOffdiag),INTENT(INOUT) :: denCoeffsOffdiag TYPE(t_eigVecCoeffs),INTENT(IN) :: eigVecCoeffs
! .. Scalar Arguments .. ! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: ne INTEGER, INTENT(IN) :: ne
! .. Array Arguments .. ! .. Array Arguments ..
REAL, INTENT (IN) :: we(:)!(nobd) REAL, INTENT(IN) :: we(:)!(nobd)
COMPLEX, INTENT(INOUT) :: uu21(atoms%lmaxd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: ud21(atoms%lmaxd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: du21(atoms%lmaxd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: dd21(atoms%lmaxd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: uulo21(atoms%nlod,atoms%ntype)
COMPLEX, INTENT(INOUT) :: dulo21(atoms%nlod,atoms%ntype)
COMPLEX, INTENT(INOUT) :: ulou21(atoms%nlod,atoms%ntype)
COMPLEX, INTENT(INOUT) :: ulod21(atoms%nlod,atoms%ntype)
COMPLEX, INTENT(INOUT) :: uloulop21(atoms%nlod,atoms%nlod,atoms%ntype)
! .. Local Scalars .. ! .. Local Scalars ..
INTEGER i,l,lm ,itype,na,natom,lo,lop,m INTEGER i,l,lm,itype,na,natom,lo,lop,m
natom = 0 natom = 0
DO itype = 1,atoms%ntype DO itype = 1,atoms%ntype
DO na = 1,atoms%neq(itype) DO na = 1,atoms%neq(itype)
...@@ -35,14 +46,10 @@ CONTAINS ...@@ -35,14 +46,10 @@ CONTAINS
lm = l* (l+1) + m lm = l* (l+1) + m
!---> sum over occupied bands !---> sum over occupied bands
DO i = 1,ne DO i = 1,ne
denCoeffsOffdiag%uu21(l,itype) = denCoeffsOffdiag%uu21(l,itype) +& uu21(l,itype) = uu21(l,itype) + we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%acof(i,lm,natom,1)
we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%acof(i,lm,natom,1) ud21(l,itype) = ud21(l,itype) + we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%bcof(i,lm,natom,1)
denCoeffsOffdiag%ud21(l,itype) = denCoeffsOffdiag%ud21(l,itype) +& du21(l,itype) = du21(l,itype) + we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%acof(i,lm,natom,1)
we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%bcof(i,lm,natom,1) dd21(l,itype) = dd21(l,itype) + we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%bcof(i,lm,natom,1)
denCoeffsOffdiag%du21(l,itype) = denCoeffsOffdiag%du21(l,itype) +&
we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%acof(i,lm,natom,1)
denCoeffsOffdiag%dd21(l,itype) = denCoeffsOffdiag%dd21(l,itype) +&
we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%bcof(i,lm,natom,1)
ENDDO ! i = 1,ne ENDDO ! i = 1,ne
ENDDO ! m = -l,l ENDDO ! m = -l,l
ENDDO ! l ENDDO ! l
...@@ -55,14 +62,10 @@ CONTAINS ...@@ -55,14 +62,10 @@ CONTAINS
DO m = -l,l DO m = -l,l
lm = l* (l+1) + m lm = l* (l+1) + m
DO i = 1,ne DO i = 1,ne
denCoeffsOffdiag%uulo21(lo,itype) = denCoeffsOffdiag%uulo21(lo,itype) +& uulo21(lo,itype) = uulo21(lo,itype) + we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%ccof(m,i,lo,natom,1)
we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%ccof(m,i,lo,natom,1) dulo21(lo,itype) = dulo21(lo,itype) + we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%ccof(m,i,lo,natom,1)
denCoeffsOffdiag%dulo21(lo,itype) = denCoeffsOffdiag%dulo21(lo,itype) +& ulou21(lo,itype) = ulou21(lo,itype) + we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,1))*eigVecCoeffs%ccof(m,i,lo,natom,2)
we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%ccof(m,i,lo,natom,1) ulod21(lo,itype) = ulod21(lo,itype) + we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,1))*eigVecCoeffs%ccof(m,i,lo,natom,2)
denCoeffsOffdiag%ulou21(lo,itype) = denCoeffsOffdiag%ulou21(lo,itype) +&
we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,1))*eigVecCoeffs%ccof(m,i,lo,natom,2)
denCoeffsOffdiag%ulod21(lo,itype) = denCoeffsOffdiag%ulod21(lo,itype) +&
we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,1))*eigVecCoeffs%ccof(m,i,lo,natom,2)
ENDDO ENDDO
ENDDO ENDDO
!---> contribution of local orbital - local orbital terms !---> contribution of local orbital - local orbital terms
...@@ -71,8 +74,8 @@ CONTAINS ...@@ -71,8 +74,8 @@ CONTAINS
IF (atoms%llo(lop,itype).EQ.l) THEN IF (atoms%llo(lop,itype).EQ.l) THEN
DO m = -l,l DO m = -l,l
DO i = 1,ne DO i = 1,ne
denCoeffsOffdiag%uloulop21(lop,lo,itype) = denCoeffsOffdiag%uloulop21(lop,lo,itype)+& uloulop21(lop,lo,itype) = uloulop21(lop,lo,itype)+&
we(i)*CONJG(eigVecCoeffs%ccof(m,i,lop,natom,2))*eigVecCoeffs%ccof(m,i,lo, natom,1) we(i)*CONJG(eigVecCoeffs%ccof(m,i,lop,natom,2))*eigVecCoeffs%ccof(m,i,lo, natom,1)
ENDDO ! i = 1,ne ENDDO ! i = 1,ne
ENDDO ! m = -l,l ENDDO ! m = -l,l
ENDIF ENDIF
......
...@@ -11,24 +11,28 @@ MODULE m_rhonmt21 ...@@ -11,24 +11,28 @@ MODULE m_rhonmt21
! pk`00 ff`01 gb`02 ! pk`00 ff`01 gb`02
! ************************************************************* ! *************************************************************
CONTAINS CONTAINS
SUBROUTINE rhonmt21(atoms,sphhar,we,ne,sym,eigVecCoeffs,denCoeffsOffdiag) SUBROUTINE rhonmt21(atoms,sphhar,we,ne,sym,eigVecCoeffs,uunmt21,udnmt21,dunmt21,ddnmt21)
USE m_gaunt,ONLY:gaunt1 USE m_gaunt,ONLY:gaunt1
USE m_types USE m_types_setup
USE m_types_cdnval
IMPLICIT NONE IMPLICIT NONE
TYPE(t_sym),INTENT(IN) :: sym TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_sphhar),INTENT(IN) :: sphhar TYPE(t_sphhar), INTENT(IN) :: sphhar
TYPE(t_atoms),INTENT(IN) :: atoms TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_eigVecCoeffs),INTENT(IN) :: eigVecCoeffs TYPE(t_eigVecCoeffs), INTENT(IN) :: eigVecCoeffs
TYPE(t_denCoeffsOffdiag),INTENT(INOUT) :: denCoeffsOffdiag
! .. Scalar Arguments .. ! .. Scalar Arguments ..
INTEGER,INTENT(IN) :: ne INTEGER, INTENT(IN) :: ne
! .. Array Arguments .. ! .. Array Arguments ..
REAL, INTENT(IN) :: we(:)!(nobd) REAL, INTENT(IN) :: we(:)!(nobd)
COMPLEX, INTENT(INOUT) :: uunmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: udnmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: dunmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: ddnmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype)
! .. Local Scalars .. ! .. Local Scalars ..
COMPLEX coef, cconst, cil, coef1 COMPLEX coef, cconst, cil, coef1
...@@ -65,14 +69,14 @@ CONTAINS ...@@ -65,14 +69,14 @@ CONTAINS
IF (ABS(coef) >= 0 ) THEN IF (ABS(coef) >= 0 ) THEN
DO nb = 1,ne DO nb = 1,ne
cconst= we(nb) * coef cconst= we(nb) * coef
denCoeffsOffdiag%uunmt21(llp,lh,nn) = denCoeffsOffdiag%uunmt21(llp,lh,nn)+ & uunmt21(llp,lh,nn) = uunmt21(llp,lh,nn)+ &
cconst * eigVecCoeffs%acof(nb,lm,nt,1)*CONJG(eigVecCoeffs%acof(nb,lmp,nt,2)) cconst * eigVecCoeffs%acof(nb,lm,nt,1)*CONJG(eigVecCoeffs%acof(nb,lmp,nt,2))
denCoeffsOffdiag%udnmt21(llp,lh,nn) = denCoeffsOffdiag%udnmt21(llp,lh,nn)+& udnmt21(llp,lh,nn) = udnmt21(llp,lh,nn)+&
cconst * eigVecCoeffs%bcof(nb,lm,nt,1)*CONJG(eigVecCoeffs%acof(nb,lmp,nt,2)) cconst * eigVecCoeffs%bcof(nb,lm,nt,1)*CONJG(eigVecCoeffs%acof(nb,lmp,nt,2))
denCoeffsOffdiag%dunmt21(llp,lh,nn) = denCoeffsOffdiag%dunmt21(llp,lh,nn)+& dunmt21(llp,lh,nn) = dunmt21(llp,lh,nn)+&
cconst * eigVecCoeffs%acof(nb,lm,nt,1)*CONJG(eigVecCoeffs%bcof(nb,lmp,nt,2)) cconst * eigVecCoeffs%acof(nb,lm,nt,1)*CONJG(eigVecCoeffs%bcof(nb,lmp,nt,2))
denCoeffsOffdiag%ddnmt21(llp,lh,nn) = denCoeffsOffdiag%ddnmt21(llp,lh,nn)+& ddnmt21(llp,lh,nn) = ddnmt21(llp,lh,nn)+&
cconst * eigVecCoeffs%bcof(nb,lm,nt,1)*CONJG(eigVecCoeffs%bcof(nb,lmp,nt,2)) cconst * eigVecCoeffs%bcof(nb,lm,nt,1)*CONJG(eigVecCoeffs%bcof(nb,lmp,nt,2))
ENDDO ! nb ENDDO ! nb
ENDIF ! (coef >= 0) ENDIF ! (coef >= 0)
......
...@@ -47,14 +47,15 @@ io/calculator.f global/ss_sym.f global/soc_sym.f math/inv3.f io/rw_symfile.f ...@@ -47,14 +47,15 @@ io/calculator.f global/ss_sym.f global/soc_sym.f math/inv3.f io/rw_symfile.f
global/sort.f init/kptgen_hybrid.f init/od_kptsgen.f init/bravais.f init/divi.f init/brzone.f global/sort.f init/kptgen_hybrid.f init/od_kptsgen.f init/bravais.f init/divi.f init/brzone.f
init/kptmop.f init/kpttet.f init/bandstr1.F init/ordstar.f init/fulstar.f init/kprep.f init/kptmop.f init/kpttet.f init/bandstr1.F init/ordstar.f init/fulstar.f init/kprep.f
init/tetcon.f init/kvecon.f init/boxdim.f math/ylm4.f global/radsra.f math/intgr.F global/differ.f math/inwint.f init/tetcon.f init/kvecon.f init/boxdim.f math/ylm4.f global/radsra.f math/intgr.F global/differ.f math/inwint.f
math/outint.f math/outint.f xc-pot/gaunt.f math/grule.f
) )
set(inpgen_F90 ${inpgen_F90} global/constants.f90 io/xsf_io.f90 set(inpgen_F90 ${inpgen_F90} global/constants.f90 io/xsf_io.f90
eigen/vec_for_lo.f90 eigen/orthoglo.F90 juDFT/usage_data.F90 eigen/vec_for_lo.f90 eigen/orthoglo.F90 juDFT/usage_data.F90
global/enpara.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 inpgen/inpgen_help.f90 io/rw_inp.f90 juDFT/juDFT.F90 global/find_enpara.f90 global/enpara.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 inpgen/inpgen_help.f90 io/rw_inp.f90 juDFT/juDFT.F90 global/find_enpara.f90
juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 io/w_inpXML.f90 init/julia.f90 global/utility.F90 juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 io/w_inpXML.f90 init/julia.f90 global/utility.F90
init/compile_descr.F90 init/kpoints.f90 io/xmlOutput.F90 init/brzone2.f90 cdn/slab_dim.f90 cdn/slabgeom.f90 dos/nstm3.f90) init/compile_descr.F90 init/kpoints.f90 io/xmlOutput.F90 init/brzone2.f90 cdn/slab_dim.f90 cdn/slabgeom.f90 dos/nstm3.f90 cdn/int_21.f90
cdn/int_21lo.f90 cdn_mt/rhomt21.f90 cdn_mt/rhonmt21.f90)
set(fleur_SRC ${fleur_F90} ${fleur_F77}) set(fleur_SRC ${fleur_F90} ${fleur_F77})
......
...@@ -44,7 +44,7 @@ MODULE m_radovlp ...@@ -44,7 +44,7 @@ MODULE m_radovlp
CALL radfun(l,itype,ispin,epar(l,itype,ispin),vr(:,0,itype,ispin), atoms,& CALL radfun(l,itype,ispin,epar(l,itype,ispin),vr(:,0,itype,ispin), atoms,&
f(1,1,l,ispin),g(1,1,l,ispin),usdus, nodeu,noded,wronk) f(1,1,l,ispin),g(1,1,l,ispin),usdus, nodeu,noded,wronk)
ENDDO ENDDO
CALL int_21_arrays(f,g,atoms,itype,l,uun21,udn21,dun21,ddn21) CALL int_21(f,g,atoms,itype,l,uun21,udn21,dun21,ddn21)
ENDDO ENDDO
ENDDO ENDDO
......
...@@ -18,6 +18,7 @@ types/types_usdus.F90 ...@@ -18,6 +18,7 @@ types/types_usdus.F90
types/types_cdnval.f90 types/types_cdnval.f90
types/types_field.F90 types/types_field.F90
types/types_regionCharges.f90 types/types_regionCharges.f90
types/types_denCoeffsOffdiag.f90
) )
set(inpgen_F90 ${inpgen_F90} set(inpgen_F90 ${inpgen_F90}
...@@ -38,4 +39,5 @@ types/types_setup.F90 ...@@ -38,4 +39,5 @@ types/types_setup.F90
types/types_usdus.F90 types/types_usdus.F90
types/types_cdnval.f90 types/types_cdnval.f90
types/types_regionCharges.f90 types/types_regionCharges.f90
types/types_denCoeffsOffdiag.f90
) )
...@@ -22,4 +22,6 @@ MODULE m_types ...@@ -22,4 +22,6 @@ MODULE m_types
USE m_types_cdnval USE m_types_cdnval
USE m_types_field USE m_types_field
USE m_types_regionCharges USE m_types_regionCharges
USE m_types_denCoeffsOffdiag
END MODULE m_types END MODULE m_types
...@@ -60,46 +60,6 @@ PRIVATE ...@@ -60,46 +60,6 @@ PRIVATE
PROCEDURE,PASS :: init => denCoeffs_init PROCEDURE,PASS :: init => denCoeffs_init
END TYPE t_denCoeffs END TYPE t_denCoeffs
TYPE t_denCoeffsOffdiag
LOGICAL :: l_fmpl
! spherical
COMPLEX, ALLOCATABLE :: uu21(:,:)
COMPLEX, ALLOCATABLE :: dd21(:,:)
COMPLEX, ALLOCATABLE :: du21(:,:)
COMPLEX, ALLOCATABLE :: ud21(:,:)
! nonspherical
COMPLEX, ALLOCATABLE :: uunmt21(:,:,:)
COMPLEX, ALLOCATABLE :: ddnmt21(:,:,:)
COMPLEX, ALLOCATABLE :: dunmt21(:,:,:)
COMPLEX, ALLOCATABLE :: udnmt21(:,:,:)
! spherical - LOs
COMPLEX, ALLOCATABLE :: uulo21(:,:)
COMPLEX, ALLOCATABLE :: dulo21(:,:)
COMPLEX, ALLOCATABLE :: ulou21(:,:)
COMPLEX, ALLOCATABLE :: ulod21(:,:)
COMPLEX, ALLOCATABLE :: uloulop21(:,:,:)
! norms
REAL, ALLOCATABLE :: uu21n(:,:)
REAL, ALLOCATABLE :: ud21n(:,:)
REAL, ALLOCATABLE :: du21n(:,:)
REAL, ALLOCATABLE :: dd21n(:,:)
REAL, ALLOCATABLE :: uulo21n(:,:)
REAL, ALLOCATABLE :: dulo21n(:,:)
REAL, ALLOCATABLE :: ulou21n(:,:)
REAL, ALLOCATABLE :: ulod21n(:,:)
REAL, ALLOCATABLE :: uloulop21n(:,:,:)
CONTAINS
PROCEDURE,PASS :: init => denCoeffsOffdiag_init
END TYPE t_denCoeffsOffdiag
TYPE t_force TYPE t_force
COMPLEX, ALLOCATABLE :: f_a12(:,:) COMPLEX, ALLOCATABLE :: f_a12(:,:)
COMPLEX, ALLOCATABLE :: f_a21(:,:) COMPLEX, ALLOCATABLE :: f_a21(:,:)
...@@ -202,7 +162,7 @@ PRIVATE ...@@ -202,7 +162,7 @@ PRIVATE
PROCEDURE,PASS :: init => gVacMap_init PROCEDURE,PASS :: init => gVacMap_init
END TYPE t_gVacMap END TYPE t_gVacMap
PUBLIC t_orb, t_denCoeffs, t_denCoeffsOffdiag, t_force, t_slab, t_eigVecCoeffs PUBLIC t_orb, t_denCoeffs, t_force, t_slab, t_eigVecCoeffs
PUBLIC t_mcd, t_moments, t_orbcomp, t_cdnvalKLoop, t_gVacMap PUBLIC t_mcd, t_moments, t_orbcomp, t_cdnvalKLoop, t_gVacMap
CONTAINS CONTAINS
...@@ -338,113 +298,6 @@ SUBROUTINE denCoeffs_init(thisDenCoeffs, atoms, sphhar, jsp_start, jsp_end) ...@@ -338,113 +298,6 @@ SUBROUTINE denCoeffs_init(thisDenCoeffs, atoms, sphhar, jsp_start, jsp_end)
END SUBROUTINE denCoeffs_init END SUBROUTINE denCoeffs_init
SUBROUTINE denCoeffsOffdiag_init(thisDenCoeffsOffdiag, atoms, noco, sphhar, l_fmpl)
USE m_types_setup
IMPLICIT NONE
CLASS(t_denCoeffsOffdiag), INTENT(INOUT) :: thisDenCoeffsOffdiag
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_noco), INTENT(IN) :: noco
TYPE(t_sphhar), INTENT(IN) :: sphhar
LOGICAL, INTENT(IN) :: l_fmpl
thisDenCoeffsOffdiag%l_fmpl = l_fmpl
IF (