LCOV - code coverage report
Current view: top level - cdn_mt - rhomt21.f90 (source / functions) Hit Total Coverage
Test: combined.info Lines: 0 28 0.0 %
Date: 2019-09-08 04:53:50 Functions: 0 1 0.0 %

          Line data    Source code
       1             : MODULE m_rhomt21
       2             :   !     ***************************************************************
       3             :   !     perform the sum over m (for each l) and bands to set up the
       4             :   !     coefficient of spherical charge densities in subroutine 
       5             :   !     cdnval                                 
       6             :   !     for offdiagonal matrix-elements in case of noncollinear magnetism 
       7             :   !     FF
       8             :   !     ***************************************************************
       9             : CONTAINS
      10           0 :   SUBROUTINE rhomt21(atoms,we,ne,eigVecCoeffs,uu21,ud21,du21,dd21,uulo21,dulo21,ulou21,ulod21,uloulop21)
      11             : 
      12             :     USE m_types_setup
      13             :     USE m_types_cdnval
      14             : 
      15             :     IMPLICIT NONE
      16             : 
      17             :     TYPE(t_atoms),       INTENT(IN)    :: atoms
      18             :     TYPE(t_eigVecCoeffs),INTENT(IN)    :: eigVecCoeffs
      19             : 
      20             :     !     .. Scalar Arguments ..
      21             :     INTEGER,             INTENT(IN)    :: ne 
      22             : 
      23             :     !     .. Array Arguments ..
      24             :     REAL,                INTENT(IN)    :: we(:)!(nobd)
      25             :     COMPLEX,             INTENT(INOUT) :: uu21(0:atoms%lmaxd,atoms%ntype)
      26             :     COMPLEX,             INTENT(INOUT) :: ud21(0:atoms%lmaxd,atoms%ntype)
      27             :     COMPLEX,             INTENT(INOUT) :: du21(0:atoms%lmaxd,atoms%ntype)
      28             :     COMPLEX,             INTENT(INOUT) :: dd21(0:atoms%lmaxd,atoms%ntype)
      29             :     COMPLEX,             INTENT(INOUT) :: uulo21(atoms%nlod,atoms%ntype)
      30             :     COMPLEX,             INTENT(INOUT) :: dulo21(atoms%nlod,atoms%ntype)
      31             :     COMPLEX,             INTENT(INOUT) :: ulou21(atoms%nlod,atoms%ntype)
      32             :     COMPLEX,             INTENT(INOUT) :: ulod21(atoms%nlod,atoms%ntype)
      33             :     COMPLEX,             INTENT(INOUT) :: uloulop21(atoms%nlod,atoms%nlod,atoms%ntype)
      34             : 
      35             :     !     .. Local Scalars ..
      36             :     INTEGER i,l,lm,itype,na,natom,lo,lop,m
      37           0 :     natom = 0
      38           0 :     DO itype = 1,atoms%ntype
      39           0 :        DO na = 1,atoms%neq(itype)
      40           0 :           natom = natom + 1
      41             :           !
      42             :           !--->       normal u, du contribution
      43             :           !
      44           0 :           DO l = 0,atoms%lmax(itype)
      45           0 :              DO m = -l,l
      46           0 :                 lm = l* (l+1) + m
      47             :                 !--->           sum over occupied bands
      48           0 :                 DO i = 1,ne
      49           0 :                    uu21(l,itype) = uu21(l,itype) + we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%acof(i,lm,natom,1)
      50           0 :                    ud21(l,itype) = ud21(l,itype) + we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%bcof(i,lm,natom,1)
      51           0 :                    du21(l,itype) = du21(l,itype) + we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%acof(i,lm,natom,1)
      52           0 :                    dd21(l,itype) = dd21(l,itype) + we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%bcof(i,lm,natom,1)
      53             :                 ENDDO ! i = 1,ne
      54             :              ENDDO   ! m = -l,l
      55             :           ENDDO     ! l
      56             :           !
      57             :           !--->       loop over the local orbitals
      58             :           !
      59           0 :           DO lo = 1,atoms%nlo(itype)
      60           0 :              l = atoms%llo(lo,itype)
      61             :              !--->         contribution of cross terms flapw - local orbitals
      62           0 :              DO m = -l,l
      63           0 :                 lm = l* (l+1) + m
      64           0 :                 DO i = 1,ne
      65           0 :                    uulo21(lo,itype) = uulo21(lo,itype) + we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%ccof(m,i,lo,natom,1)
      66           0 :                    dulo21(lo,itype) = dulo21(lo,itype) + we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%ccof(m,i,lo,natom,1)
      67           0 :                    ulou21(lo,itype) = ulou21(lo,itype) + we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,1))*eigVecCoeffs%ccof(m,i,lo,natom,2)
      68           0 :                    ulod21(lo,itype) = ulod21(lo,itype) + we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,1))*eigVecCoeffs%ccof(m,i,lo,natom,2)
      69             :                 ENDDO
      70             :              ENDDO
      71             :              !--->         contribution of local orbital - local orbital terms
      72             :              !--->         loop over lo'
      73           0 :              DO lop = 1,atoms%nlo(itype)
      74           0 :                 IF (atoms%llo(lop,itype).EQ.l) THEN
      75           0 :                    DO m = -l,l
      76           0 :                       DO i = 1,ne
      77             :                          uloulop21(lop,lo,itype) = uloulop21(lop,lo,itype)+&
      78           0 :                                                    we(i)*CONJG(eigVecCoeffs%ccof(m,i,lop,natom,2))*eigVecCoeffs%ccof(m,i,lo, natom,1)
      79             :                       ENDDO ! i = 1,ne
      80             :                    ENDDO   ! m = -l,l
      81             :                 ENDIF
      82             :              ENDDO     ! lop
      83             :           ENDDO       ! lo
      84             : 
      85             :        ENDDO          ! na
      86             :     ENDDO             ! itype
      87             : 
      88           0 :   END SUBROUTINE rhomt21
      89             : END MODULE m_rhomt21

Generated by: LCOV version 1.13