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

          Line data    Source code
       1             : MODULE m_int21lo
       2             :   !-----------------------------------------------------------
       3             :   !
       4             :   ! Integrates combinations of flo(:,:,llo,s) with itself, f(:,:,l,s) 
       5             :   ! and g(:,:,l,s) (s=1,2) for given llo and itype with different 
       6             :   ! spins (s).
       7             :   ! Output is ..n21(l,itype), where .. is a combination of (u,d) and
       8             :   ! ulo dependent on the (f,g) combination used. Also ..n12 and 
       9             :   ! uloulop21n are calculated.
      10             :   !
      11             :   !-----------------------------------------------------------
      12             : CONTAINS
      13           0 :   SUBROUTINE int_21lo(f,g,atoms,n,flo,ilo,uulo21n,ulou21n,dulo21n,ulod21n,uloulop21n)
      14             : 
      15             :     USE m_intgr, ONLY : intgr3
      16             :     USE m_types_setup
      17             :     IMPLICIT NONE
      18             :     TYPE(t_atoms),             INTENT(IN)    :: atoms
      19             :     REAL,                      INTENT(INOUT) :: uulo21n(atoms%nlod,atoms%ntype)
      20             :     REAL,                      INTENT(INOUT) :: ulou21n(atoms%nlod,atoms%ntype)
      21             :     REAL,                      INTENT(INOUT) :: dulo21n(atoms%nlod,atoms%ntype)
      22             :     REAL,                      INTENT(INOUT) :: ulod21n(atoms%nlod,atoms%ntype)
      23             :     REAL,                      INTENT(INOUT) :: uloulop21n(atoms%nlod,atoms%nlod,atoms%ntype)
      24             :     !     ..
      25             :     !     .. Scalar Arguments ..
      26             :     INTEGER, INTENT (IN) :: ilo,n
      27             :     !     ... Array Arguments
      28             :     REAL,    INTENT (IN) :: f(:,:,0:,:)!(atoms%jmtd,2,0:atoms%lmaxd,input%jspins)
      29             :     REAL,    INTENT (IN) :: g(:,:,0:,:)!(atoms%jmtd,2,0:atoms%lmaxd,input%jspins)
      30             :     REAL,    INTENT (IN) :: flo(:,:,:,:)!(atoms%jmtd,2,atoms%nlod,input%jspins)
      31             : 
      32             :     !     ...local scalars
      33             :     INTEGER iri,l,lp,ilop
      34             :     !     ...local arrays
      35           0 :     REAL    uu_tmp(atoms%jri(n))
      36             : 
      37             :     !
      38             :     ! --> norm of product of u and ulo:
      39             :     !
      40           0 :     l = atoms%llo(ilo,n)
      41           0 :     DO iri = 1, atoms%jri(n)
      42           0 :        uu_tmp(iri) = f(iri,1,l,2)*flo(iri,1,ilo,1)+ f(iri,2,l,2)*flo(iri,2,ilo,1)
      43             :     ENDDO
      44           0 :     CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),uulo21n(ilo,n))
      45           0 :     DO iri = 1, atoms%jri(n)
      46           0 :        uu_tmp(iri) = f(iri,1,l,1)*flo(iri,1,ilo,2)+ f(iri,2,l,1)*flo(iri,2,ilo,2)
      47             :     ENDDO
      48           0 :     CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),ulou21n(ilo,n))
      49             :     !
      50             :     ! --> norm of product of du and ulo:
      51             :     !
      52           0 :     DO iri = 1, atoms%jri(n)
      53           0 :        uu_tmp(iri) = g(iri,1,l,2)*flo(iri,1,ilo,1) + g(iri,2,l,2)*flo(iri,2,ilo,1)
      54             :     ENDDO
      55           0 :     CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),dulo21n(ilo,n))
      56           0 :     DO iri = 1, atoms%jri(n)
      57           0 :        uu_tmp(iri) = g(iri,1,l,1)*flo(iri,1,ilo,2) + g(iri,2,l,1)*flo(iri,2,ilo,2)
      58             :     ENDDO
      59           0 :     CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),ulod21n(ilo,n))
      60             :     !
      61             :     ! --> norm of product of ulo and ulo':
      62             :     !
      63           0 :     DO ilop = 1, atoms%nlo(n)
      64           0 :        lp = atoms%llo(ilop,n)
      65           0 :        IF (l.EQ.lp) THEN
      66           0 :           DO iri = 1, atoms%jri(n)
      67           0 :              uu_tmp(iri) = flo(iri,1,ilo,2)*flo(iri,1,ilop,1) + flo(iri,2,ilo,2)*flo(iri,2,ilop,1)
      68             :           ENDDO
      69           0 :           CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),uloulop21n(ilo,ilop,n))
      70             : 
      71             :        ELSE
      72           0 :           uloulop21n(ilo,ilop,n) = 0.0
      73             :        ENDIF
      74             :     ENDDO
      75             : 
      76           0 :   END SUBROUTINE int_21lo
      77             : END MODULE m_int21lo

Generated by: LCOV version 1.13