LCOV - code coverage report
Current view: top level - eigen_soc - sgml.f90 (source / functions) Hit Total Coverage
Test: combined.info Lines: 13 23 56.5 %
Date: 2019-09-08 04:53:50 Functions: 1 1 100.0 %

          Line data    Source code
       1             : MODULE m_sgml
       2             :   CONTAINS
       3      771584 :   REAL FUNCTION sgml(l1,m1,is1,l2,m2,is2)
       4             :     USE m_juDFT
       5             :     !
       6             :     ! FUNCTION SGML ******************************************************
       7             :     !
       8             :     !      THIS FUNCTION CALCULATES ANGULAR PART OF THE MATRIX ELEMENT
       9             :     !
      10             :     !      ( < L1 MP1 IS1 ! SGM*L ! L2 MP2 IS2 > ) OF SPIN-ORBIT COUPLING
      11             :     !
      12             :     !      FOR COMPLEX :: SPHERICAL HARMONICS FOR :
      13             :     !      L >= 0 ,-L <= M <= L , SGM = 1 OR -1 , IS = 1   OR -1
      14             :     !
      15             :     !                             SATOSHI TAKIZAWA, ISSP, MAR 1990
      16             :     !            MODIFIED BY      STEFAN BL"UGEL  , ISSP, MAR 1990
      17             :     ! *********************************************************************
      18             :     !
      19             :     IMPLICIT NONE
      20             :     !     ..
      21             :     !     .. Scalar Arguments ..
      22             :     INTEGER is1,is2,l1,l2,m1,m2
      23             :     !     ..
      24             :     !     .. Local Scalars ..
      25             :     REAL sgm1,sgm2
      26             :     !     ..
      27             :     !     ..
      28      771584 :     IF (l1.NE.l2) THEN
      29             :        sgml = 0.0
      30             :        RETURN
      31             :     ELSE
      32       91920 :        sgm1 = is1
      33       91920 :        sgm2 = is2
      34       91920 :        IF (l1.LT.0) THEN
      35           0 :           WRITE (6,FMT=*) ' PROGRAM STOPS IN FUNCTION SGML ( L < 0 ) .'
      36           0 :           WRITE (6,FMT=*) ' L1 =',l1,'    L2 =',l2
      37           0 :           CALL juDFT_error("SGMLR",calledby="sgml")
      38       91920 :        ELSE IF ((ABS(m1).GT.l1) .OR. (ABS(m2).GT.l2)) THEN
      39           0 :           WRITE (6,FMT=*) ' PROGRAM STOPS IN SGMLC ( jij%M < L OR L < jij%M )'
      40           0 :           WRITE (6,FMT=*) ' L1 =',l1,'    L2 =',l2
      41           0 :           WRITE (6,FMT=*) ' M1 =',m1,'    M2 =',m2
      42           0 :           CALL juDFT_error("SGML",calledby="sgml")
      43      183840 :        ELSE IF ((is1.NE.-1.AND.is1.NE.1) .OR. (is2.NE.-1.AND.is2.NE.1)) THEN
      44           0 :           WRITE (6,FMT=*) ' PROGRAM STOPS IN FUNCTION SGMLC ( S >< +-1/2 ) .'
      45           0 :           WRITE (6,FMT=*) ' S1 =',0.5*sgm1,'    S2 =',0.5*sgm2
      46           0 :           CALL juDFT_error("SGML",calledby="sgml")
      47             :        END IF
      48             :        !
      49             :        !
      50       91920 :        IF (m1.EQ.m2+1 .AND. is1.EQ.is2-2) THEN
      51        1420 :           sgml = SQRT(REAL((l2-m2)* (l2+m2+1)))
      52       96180 :        ELSE IF (m1.EQ.m2-1 .AND. is1.EQ.is2+2) THEN
      53        1420 :           sgml = SQRT(REAL((l2+m2)* (l2-m2+1)))
      54       95288 :        ELSE IF (m1.EQ.m2 .AND. is1.EQ.is2) THEN
      55        3104 :           sgml = m2*sgm2
      56             :        ELSE
      57             :           sgml = 0.0
      58             :        END IF
      59             :        RETURN
      60             :     END IF
      61             :     !
      62             :     RETURN
      63             :   END FUNCTION sgml
      64             : END MODULE m_sgml

Generated by: LCOV version 1.13