LCOV - code coverage report
Current view: top level - propcalc/dos - dos_bin.f90 (source / functions) Hit Total Coverage
Test: FLEUR test coverage Lines: 14 14 100.0 %
Date: 2024-05-15 04:28:08 Functions: 1 1 100.0 %

          Line data    Source code
       1             : MODULE m_dosbin
       2             : CONTAINS
       3          14 :    SUBROUTINE dos_bin(jspins, wtkpt, e, eig, qal, g, energyShift)
       4             :       !! This subroutine generates the idos, the ldos, the partial
       5             :       !! ldos in the spheres and the z-dependent dos for the vacuum.
       6             : 
       7             :       IMPLICIT NONE
       8             : 
       9             :       INTEGER, INTENT(IN)  :: jspins
      10             :       REAL,    INTENT(IN)  :: wtkpt(:),e(:)
      11             :       REAL,    INTENT(IN)  :: eig(:,:,:),qal(:,:,:)
      12             :       REAL,    INTENT(OUT) :: g(:,:)
      13             : 
      14             :       REAL,    OPTIONAL, INTENT(IN) :: energyShift
      15             : 
      16             :       INTEGER :: nl, k, j, i, js
      17             :       REAL    :: de, wk, emin, shift
      18             : 
      19          14 :       de = abs(e(2)-e(1))
      20       27776 :       g = 0.0
      21          14 :       shift = 0.0
      22          14 :       IF(PRESENT(energyShift)) shift = energyShift
      23       18508 :       emin = minval(e)
      24             :       ! put weights in the right bins
      25          35 :       DO js=1, size(qal,3)
      26          56 :          DO k = 1 , size(qal,2)
      27          21 :             wk = wtkpt(k)/de
      28         546 :             DO j = 1 , size(eig,1)
      29         504 :                i = NINT((eig(j,k,js)-shift-emin)/de) + 1
      30         525 :                IF ( (i.LE.size(g,1)) .AND. (i.GE.1) ) THEN
      31         294 :                   g(i,js) = g(i,js) + wk*qal(j,k,js)* 2.0/jspins
      32             :                END IF
      33             :             END DO
      34             :          END DO
      35             :       END DO
      36          14 :    END SUBROUTINE dos_bin
      37             : END MODULE m_dosbin

Generated by: LCOV version 1.14