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

          Line data    Source code
       1             : 
       2             : MODULE m_hyb_abcrot
       3             : CONTAINS
       4           0 :    SUBROUTINE hyb_abcrot(hybrid, atoms, neig, sym, cell, oneD,&
       5           0 :   &                 acof, bcof, ccof)
       6             : !     ***************************************************************
       7             : !     * This routine transforms a/b/cof which are given wrt rotated *
       8             : !     * MT functions (according to invsat/ngopr) into a/b/cof wrt   *
       9             : !     * unrotated MT functions. Needed for GW calculations.         *
      10             : !     *                                                             *
      11             : !     * Christoph Friedrich Mar/2005                                *
      12             : !     ***************************************************************
      13             :       USE m_dwigner
      14             :       USE m_types
      15             :       IMPLICIT NONE
      16             :       TYPE(t_hybrid), INTENT(IN) :: hybrid
      17             :       TYPE(t_oneD), INTENT(IN)   :: oneD
      18             :       TYPE(t_sym), INTENT(IN)    :: sym
      19             :       TYPE(t_cell), INTENT(IN)   :: cell
      20             :       TYPE(t_atoms), INTENT(IN)  :: atoms
      21             : !     ..
      22             : !     .. Scalar Arguments ..
      23             :       INTEGER, INTENT(IN) :: neig
      24             : !     ..
      25             : !     .. Array Arguments ..
      26             : 
      27             :       COMPLEX, INTENT(INOUT) :: acof(:, 0:, :) !(dimension%neigd,0:dimension%lmd,atoms%natd)
      28             :       COMPLEX, INTENT(INOUT) :: bcof(:, 0:, :) !(dimension%neigd,0:dimension%lmd,atoms%natd)
      29             :       COMPLEX, INTENT(INOUT) :: ccof(-atoms%llod:, :, :, :)!(-llod:llod,dimension%neigd,atoms%nlod,atoms%natd)
      30             : !     ..
      31             : !     .. Local Scalars ..
      32             :       INTEGER itype, ineq, iatom, iop, ilo, i, l, lm, lmp, ifac
      33             : !     ..
      34             : !     .. Local Arrays ..
      35             : !***** COMPLEX, ALLOCATABLE :: d_wgn(:,:,:,:) !put into module m_savewigner
      36             : !
      37             : 
      38           0 :       IF (.NOT. ALLOCATED(hybrid%d_wgn2)) THEN    !calculate sym%d_wgn only once
      39           0 :          PRINT *, "calculate wigner-matrix"
      40           0 :          STOP "WIGNER MATRIX should be available in hybrid part"
      41             :          !IF (.NOT.oneD%odi%d1) THEN
      42             :          !  ALLOCATE (sym%d_wgn(-atoms%lmaxd:atoms%lmaxd,-atoms%lmaxd:atoms%lmaxd,atoms%lmaxd,sym%nop))
      43             :          !  CALL d_wigner(sym%nop,sym%mrot,cell%bmat,atoms%lmaxd,sym%d_wgn)
      44             :          !ELSE
      45             :          !  ALLOCATE (sym%d_wgn(-atoms%lmaxd:atoms%lmaxd,-atoms%lmaxd:atoms%lmaxd,atoms%lmaxd,oneD%ods%nop))
      46             :          !  CALL d_wigner(oneD%ods%nop,oneD%ods%mrot,cell%bmat,atoms%lmaxd,sym%d_wgn)
      47             :          !ENDIF
      48             :       ENDIF
      49             : 
      50           0 :       iatom = 0
      51           0 :       DO itype = 1, atoms%ntype
      52           0 :          DO ineq = 1, atoms%neq(itype)
      53           0 :             iatom = iatom + 1
      54           0 :             IF (.NOT. oneD%odi%d1) THEN
      55           0 :                iop = atoms%ngopr(iatom)
      56             :             ELSE
      57           0 :                iop = oneD%ods%ngopr(iatom)
      58             :             ENDIF
      59             : !                                    l                        l    l
      60             : ! inversion of spherical harmonics: Y (pi-theta,pi+phi) = (-1)  * Y (theta,phi)
      61             : !                                    m                             m
      62           0 :             ifac = 1
      63           0 :             IF (atoms%invsat(iatom) == 2) THEN
      64           0 :                IF (.NOT. oneD%odi%d1) THEN
      65           0 :                   iop = atoms%ngopr(sym%invsatnr(iatom))
      66             :                ELSE
      67           0 :                   iop = oneD%ods%ngopr(sym%invsatnr(iatom))
      68             :                ENDIF
      69             :                ifac = -1
      70             :             ENDIF
      71           0 :             DO l = 1, atoms%lmax(itype)
      72             : !  replaced d_wgn by conjg(d_wgn),FF October 2006
      73           0 :                DO i = 1, neig
      74           0 :                   acof(i, l**2:l*(l + 2), iatom) = ifac**l*matmul(conjg(hybrid%d_wgn2(-l:l, -l:l, l, iop)), acof(i, l**2:l*(l + 2), iatom))
      75           0 :                   bcof(i, l**2:l*(l + 2), iatom) = ifac**l*matmul(conjg(hybrid%d_wgn2(-l:l, -l:l, l, iop)), bcof(i, l**2:l*(l + 2), iatom))
      76             :                ENDDO
      77             :             ENDDO
      78           0 :             DO ilo = 1, atoms%nlo(itype)
      79           0 :                l = atoms%llo(ilo, itype)
      80           0 :                IF (l > 0) THEN
      81           0 :                   DO i = 1, neig
      82           0 :                      ccof(-l:l, i, ilo, iatom) = ifac**l*matmul(conjg(hybrid%d_wgn2(-l:l, -l:l, l, iop)), ccof(-l:l, i, ilo, iatom))
      83             :                   ENDDO
      84             :                ENDIF
      85             :             ENDDO
      86             :          ENDDO
      87             :       ENDDO
      88             : 
      89           0 :    END SUBROUTINE hyb_abcrot
      90             : END MODULE m_hyb_abcrot

Generated by: LCOV version 1.13