LCOV - code coverage report
Current view: top level - init - gen_map.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_gen_map
       2             : 
       3             : IMPLICIT NONE
       4             : 
       5             : CONTAINS
       6             : 
       7             : !
       8             : ! build up field map(iatom,isym), which contains the number of the atom, on 
       9             : ! which the atom iatom is mapped via the symmetry operation isym
      10             : ! tvec is the translation, which maps R R_a + tau back in the unit cell
      11             : !
      12           0 : SUBROUTINE gen_map(atoms,sym,oneD,hybrid)
      13             :   USE m_types
      14             :   TYPE(t_atoms),INTENT(IN) :: atoms
      15             :   TYPE(t_sym),INTENT(IN)   :: sym
      16             :   TYPE(t_oneD),INTENT(IN)  :: oneD
      17             :   TYPE(t_hybrid),INTENT(INOUT)::hybrid
      18             :   ! private scalars
      19             :   INTEGER                           :: iatom,iatom0,itype,ieq,isym,iisym,ieq1
      20             :   INTEGER                           :: ratom,ok
      21             :   ! private arrays
      22             :   REAL                              :: rtaual(3)
      23             : 
      24           0 :   ALLOCATE( hybrid%map(atoms%nat,sym%nsym) , stat = ok )
      25           0 :   IF( ok .ne. 0 ) STOP 'gen_map: error during allocation of map'
      26             : 
      27           0 :   ALLOCATE( hybrid%tvec(3,atoms%nat,sym%nsym) , stat = ok )
      28           0 :   IF( ok .ne. 0 ) STOP 'gen_map: error during allocation of tvec'
      29             : 
      30           0 :   iatom  = 0
      31           0 :   iatom0 = 0
      32           0 :   DO itype = 1,atoms%ntype
      33           0 :     DO ieq = 1,atoms%neq(itype)
      34           0 :       iatom = iatom + 1
      35           0 :       DO isym = 1,sym%nsym
      36             : 
      37           0 :         IF( isym .le. sym%nop ) THEN
      38             :           iisym = isym
      39             :         ELSE
      40           0 :           iisym = isym - sym%nop
      41             :         END IF
      42             : 
      43           0 :         rtaual(:) = matmul(sym%mrot(:,:,iisym),atoms%taual(:,iatom)) + sym%tau(:,iisym)
      44             : 
      45           0 :         ratom = 0
      46           0 :         DO ieq1 = 1,atoms%neq(itype)
      47           0 :           IF( all(abs(modulo(rtaual-atoms%taual(:,iatom0 + ieq1)+1e-12,1.0)).lt. 1e-10) ) THEN
      48           0 :             ratom              = iatom0 + ieq1
      49           0 :             hybrid%map (  iatom,isym) = ratom
      50           0 :             hybrid%tvec(:,iatom,isym) = nint ( rtaual-atoms%taual(:,ratom) )
      51             :             CYCLE
      52             :           END IF
      53             :         END DO
      54           0 :         IF( ratom .eq. 0 ) STOP 'eigen_hf: ratom not found'
      55             : 
      56             :       END DO
      57             :     END DO
      58           0 :     iatom0 = iatom0 + atoms%neq(itype)
      59             :   END DO
      60             : 
      61           0 : END SUBROUTINE gen_map
      62             : 
      63             : END MODULE m_gen_map

Generated by: LCOV version 1.13