LCOV - code coverage report
Current view: top level - init - ss_sym.f (source / functions) Hit Total Coverage
Test: FLEUR test coverage Lines: 15 20 75.0 %
Date: 2024-04-27 04:44:07 Functions: 1 1 100.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_sssym
       8             : !-----------------------------------------------------------------------!
       9             : ! tests the compatibility of the symmetry elements with the axis (q)    !
      10             : ! defining a spin-sprial                                          gb`02 !
      11             : !-----------------------------------------------------------------------!
      12             :       CONTAINS
      13           1 :       SUBROUTINE ss_sym(
      14           1 :      >                  nop,mrot,qss,
      15           1 :      <                  error)
      16             :       
      17             :       USE m_constants
      18             :       IMPLICIT NONE
      19             : 
      20             :       INTEGER, INTENT (IN)  :: nop, mrot(3,3,nop)
      21             :       REAL,    INTENT (IN)  :: qss(3)
      22             :       LOGICAL, iNTENT (OUT) :: error(nop)
      23             : 
      24             :       INTEGER iop,i,j
      25             :       REAL    qn,test
      26             :       REAL    q1(3),rrot(3,3)
      27             : 
      28             : !
      29             : ! --> loop over symmetry elements
      30             : !
      31           2 :       error(:) = .false.
      32           1 :       qn = ( qss(1)**2 + qss(2)**2 + qss(3)**2 )
      33             : 
      34           1 :       IF (qn.LT.0.0000001) THEN
      35           0 :         WRITE(*,*) 'qss = 0 ; not a spin-spiral!'
      36           0 :         RETURN
      37             :       ELSE
      38           1 :         qn = 1.0 / qn
      39             :       ENDIF
      40             : 
      41           2 :       DO iop = 1, nop
      42             : 
      43           4 :         DO i=1,3
      44          13 :            DO j=1,3
      45          12 :               rrot(i,j)= REAL(mrot(i,j,iop))
      46             :            ENDDO
      47             :         ENDDO
      48             : !
      49             : ! ----> rotate qss by symmetry element and form the dot-product
      50             : !       with unrotated vector (q1 . qss) 
      51             : !
      52          13 :          q1=matmul(qss,rrot)  
      53             : !
      54             : ! ----> if qss is unchanged, accept this symmetry element
      55             : !
      56           1 :         test = (qss(1)-q1(1))**2+(qss(2)-q1(2))**2+(qss(3)-q1(3))**2
      57           2 :         IF (abs(test).GT.0.0000001) THEN
      58           0 :           error(iop) = .true.
      59           0 :           WRITE (oUnit,100) iop
      60             :         ENDIF
      61             :       ENDDO
      62             :  100  FORMAT ('Symmetry element no.',i3,' incompatible with axis qss')
      63             :       
      64           2 :       IF ( ANY(error(:)) ) THEN
      65             :         WRITE (oUnit,*) 
      66           0 :      +     'symmetry incompatible with Spin Spiral Axis [qss]'
      67             :       ENDIF
      68             :       END SUBROUTINE ss_sym
      69             :       END MODULE m_sssym
      70             : 

Generated by: LCOV version 1.14