LCOV - code coverage report
Current view: top level - xc-pot - potl0.f90 (source / functions) Coverage Total Hit
Test: FLEUR test coverage Lines: 100.0 % 13 13
Test Date: 2025-11-24 04:36:21 Functions: 100.0 % 1 1

            Line data    Source code
       1              : MODULE m_potl0
       2              : ! ******************************************************************
       3              : ! evaluate the xc-potential vxc for charge density and its
       4              : ! gradients,dens,... only for nonmagnetic.
       5              : ! ******************************************************************
       6              : CONTAINS
       7          833 :    SUBROUTINE potl0(xcpot,jspins,dx,rad,dens, &
       8          833 :                     vxc)
       9              : 
      10              :       USE m_grdchlh
      11              :       USE m_mkgl0
      12              :       USE m_types
      13              :       IMPLICIT NONE
      14              : 
      15              :       CLASS(t_xcpot),intent(in)::xcpot
      16              :       INTEGER, INTENT (IN) :: jspins
      17              :       REAL,    INTENT (IN) :: dx
      18              :       REAL,    INTENT (IN) :: rad(:),dens(:,:)
      19              :       REAL,    INTENT (OUT):: vxc(:,:)
      20              : 
      21              : !     .. previously untyped names ..
      22              : 
      23          833 :       TYPE(t_gradients)::grad
      24              : 
      25              :       INTEGER i,ispin,msh
      26              :       REAL, ALLOCATABLE :: drr(:,:),ddrr(:,:)
      27              : 
      28          833 :       REAL              :: vx(size(vxc,1),jspins)
      29              : 
      30          833 :       msh = size(rad)
      31         1666 :       ALLOCATE ( drr(msh,jspins),ddrr(msh,jspins))
      32              : !
      33              : !-->  evaluate gradients of dens.
      34              : !
      35          833 :       CALL xcpot%alloc_gradients(msh,jspins,grad)
      36         2036 :       DO ispin = 1, jspins
      37              :          CALL grdchlh(dx,dens(1:msh,ispin),&
      38         2036 :                      drr(:,ispin),ddrr(:,ispin),rad)
      39              :       ENDDO
      40              : 
      41              :       CALL mkgl0(jspins,rad,dens,drr,ddrr,&
      42          833 :                  grad)
      43              : !
      44              : ! --> calculate the potential.
      45              : !
      46          833 :       CALL xcpot%get_vxc(jspins, dens(:msh,:), vxc, vx, grad)
      47              : 
      48          833 :       DEALLOCATE ( drr,ddrr )
      49          833 :    END SUBROUTINE potl0
      50              : END MODULE m_potl0
        

Generated by: LCOV version 2.0-1