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

          Line data    Source code
       1             : !--------------------------------------------------------------------------------
       2             : ! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
       3             : ! This file is part of FLEUR and available as free software under the conditions
       4             : ! of the MIT license as expressed in the LICENSE file in more detail.
       5             : !--------------------------------------------------------------------------------
       6             : 
       7             :       MODULE m_od_chisym
       8             :       use m_juDFT
       9             : c*************************************************************
      10             : c     establishes the rotational matrices and translational
      11             : c     vectors in the case of one-dimensional calculations
      12             : c     according to the one-dimensional group of symmetries
      13             : c                           Y.Mokrousov 2003
      14             : c**********************************************
      15             : c     CHIRAL SYMMETRY GROUP
      16             : c     The main feature is that this group, been represented in 3D space,
      17             : c     is cyclic, with the generator <psi|tau> been simultaneous rotation
      18             : c     of the system by angle psi around z-axis and translation by tau 
      19             : c     along z-direction. The input parameters, given to the program, are:
      20             : c          - M (odd%rot)
      21             : c          - N (odd%chi),
      22             : c     where N is the number of operations in the symmetry group, so that
      23             : c     psi = 2pi/N and M is some integer:tau = M/N in the internal units.
      24             :       
      25             :       CONTAINS
      26           0 :       SUBROUTINE od_chisym(odd,mrot,tau,zrfs,invs,invs2,amat)
      27             : 
      28             :       USE m_constants, ONLY : tpi_const
      29             :       USE m_types, ONLY : od_dim
      30             :       
      31             :       IMPLICIT NONE
      32             : 
      33             :       TYPE (od_dim), INTENT (IN) :: odd
      34             :       REAL, INTENT (IN) :: amat(3,3)
      35             :       LOGICAL, INTENT (IN) :: zrfs,invs,invs2
      36             :       REAL, INTENT (OUT) :: mrot(3,3,odd%nop),tau(3,odd%nop)      
      37             : 
      38             :       INTEGER n,j,i,half
      39             :    
      40           0 :       tau(:,:) = 0.
      41           0 :       mrot(1:3,1:3,1:odd%nop) = 0.
      42           0 :       mrot(3,3,:) = 1.
      43           0 :       mrot(1,1,1) = 1.
      44           0 :       mrot(2,2,1) = 1.
      45             : 
      46           0 :       IF (.NOT.odd%invs .AND. .NOT.odd%zrfs) THEN
      47             : c for systems without z-reflection and inversion symmetries
      48           0 :         DO n = 2,odd%nop
      49           0 :          mrot(1,1,n) =  cos(tpi_const*(n-1)/odd%nop)
      50           0 :          mrot(1,2,n) =  sin(tpi_const*(n-1)/odd%nop)
      51           0 :          mrot(2,1,n) = -sin(tpi_const*(n-1)/odd%nop)
      52           0 :          mrot(2,2,n) =  cos(tpi_const*(n-1)/odd%nop)
      53           0 :          IF (odd%chi.NE.1) THEN
      54             :             tau(3,n) = tau(3,n-1) +
      55           0 :      +           amat(3,3)*(odd%rot)/(odd%chi)
      56           0 :             IF (abs(tau(3,n)-amat(3,3)).LE.1.e-4) THEN
      57           0 :                tau(3,n) = 0.
      58           0 :             ELSEIF (tau(3,n)-amat(3,3).GT.1.e-4) THEN
      59           0 :                tau(3,n) = tau(3,n) - amat(3,3)
      60             :             END IF   
      61             :          END IF
      62             :         END DO
      63             : c for systems with inversion or z-relection symmetries
      64             :       ELSE
      65           0 :          half = NINT((odd%nop)/2.)
      66           0 :          IF ((odd%nop)/2. - half > 0.001) THEN
      67             :             CALL juDFT_error("nop =/= 2*n & (invs v zrfs) !",calledby
      68           0 :      +           ="od_chisym")
      69             :          ENDIF
      70           0 :          DO n = 2,half
      71           0 :             mrot(1,1,n) =  cos(tpi_const*(n-1)/half)
      72           0 :             mrot(1,2,n) =  sin(tpi_const*(n-1)/half)
      73           0 :             mrot(2,1,n) = -sin(tpi_const*(n-1)/half)
      74           0 :             mrot(2,2,n) =  cos(tpi_const*(n-1)/half)
      75             :          END DO 
      76           0 :          IF (odd%zrfs) THEN
      77           0 :             mrot(1,1,half+1) =  1.
      78           0 :             mrot(2,2,half+1) =  1.
      79           0 :             mrot(3,3,half+1) = -1. 
      80           0 :          ELSE IF (odd%invs) THEN
      81           0 :             mrot(1,1,half+1) = -1.
      82           0 :             mrot(2,2,half+1) = -1.
      83           0 :             mrot(3,3,half+1) = -1.
      84             :          END IF
      85           0 :          DO n = 2,half
      86             :            !CALL matmul3r(mrot(:,:,n),mrot(:,:,half+1),mrot(:,:,half+n))
      87           0 :            mrot(:,:,half+n)=matmul(mrot(:,:,n),mrot(:,:,half+1))
      88             :          END DO
      89             :       END IF
      90           0 :       RETURN
      91             :       END SUBROUTINE od_chisym
      92             :       END MODULE m_od_chisym

Generated by: LCOV version 1.13