LCOV - code coverage report
Current view: top level - init - spgrot.f (source / functions) Hit Total Coverage
Test: combined.info Lines: 12 12 100.0 %
Date: 2019-09-08 04:53:50 Functions: 1 1 100.0 %

          Line data    Source code
       1             :       MODULE m_spgrot
       2             : !     **********************************************************
       3             : !     perform space group operations of film
       4             : !     **********************************************************
       5             :       CONTAINS
       6    16027390 :       SUBROUTINE spgrot(
       7    32054780 :      >                  nop,symor,mrot,tau,invtab,
       8             :      >                  k,
       9    32007313 :      <                  kr,phas)
      10             :       USE m_constants
      11             :       IMPLICIT NONE
      12             : !     ..
      13             : !     .. Scalar Arguments ..
      14             :       INTEGER, INTENT (IN)  :: nop
      15             :       LOGICAL, INTENT (IN)  :: symor
      16             : !     ..
      17             : !     .. Array Arguments ..
      18             :       INTEGER, INTENT (IN)  :: k(3),mrot(3,3,nop),invtab(nop)
      19             :       REAL,    INTENT (IN)  :: tau(3,nop)
      20             :       INTEGER, INTENT (OUT) :: kr(3,nop)
      21             :       COMPLEX,OPTIONAL, INTENT (OUT) :: phas(nop)
      22             : !     ..
      23             : !     .. Local Scalars ..
      24             :       INTEGER n,ni
      25             : 
      26   218136346 :       DO n = 1,nop
      27   218136346 :          kr(:,n) = matmul(k,mrot(:,:,n))
      28             :       ENDDO
      29    16027390 :       if (.not. present(phas)) RETURN
      30    15979923 :       IF (symor) THEN
      31   217120037 :             phas(:) = 1.
      32             :       ELSE
      33     1042350 :          DO n = 1,nop
      34      506934 :             ni = invtab(n)
      35             :             phas(n) = exp(cmplx(0.0,-1.0)*tpi_const* 
      36      535416 :      +                   dot_product(real(kr(:,n)),tau(:,ni)))
      37             : ! note that, in general phas(n) could be complex!
      38             :          ENDDO
      39             :       END IF
      40             :       RETURN
      41    16027390 :       END SUBROUTINE spgrot
      42             :       END MODULE m_spgrot

Generated by: LCOV version 1.13