LCOV - code coverage report
Current view: top level - wannier - wann_maxbnd.F (source / functions) Hit Total Coverage
Test: FLEUR test coverage Lines: 0 26 0.0 %
Date: 2024-03-28 04:22:06 Functions: 0 1 0.0 %

          Line data    Source code
       1             :       MODULE m_wann_maxbnd
       2             :          use m_juDFT
       3             : 
       4             : c****************************************************************
       5             : c    determine maximum of number of bands
       6             : c****************************************************************
       7             :       CONTAINS
       8           0 :       SUBROUTINE wann_maxbnd(
       9             :      >              eig_id,l_real,
      10             :      >              lmaxd,ntypd,nlod,neigd,nvd,jspd,
      11             :      >              isize,jspin,nbasfcn,nlotot,
      12             :      >              l_ss,l_noco,nrec,fullnkpts,
      13             :      >              l_bzsym,l_byindex,l_bynumber,l_byenergy,
      14           0 :      >              irreduc,band_min,band_max,numbands,
      15             :      >              e1s,e2s,ef,nkpt,nbnd,l_gwf,iqpt)
      16             : 
      17             :       use m_cdnread, only:cdn_read
      18             :       use m_types
      19             :       use m_wann_rw_eig
      20             : 
      21             :       IMPLICIT NONE
      22             :       integer,intent(in) :: lmaxd,ntypd,nlod,neigd,nvd,jspd,eig_id
      23             :       integer,intent(in) :: isize,jspin,nbasfcn,nlotot,iqpt
      24             :       logical,intent(in) :: l_ss,l_noco,l_gwf,l_real
      25             :       integer,intent(in) :: nrec,fullnkpts
      26             :       logical,intent(in) :: l_byindex,l_bynumber,l_byenergy
      27             :       integer,intent(in) :: irreduc(fullnkpts)
      28             :       integer,intent(in) :: band_min,band_max,numbands
      29             :       logical,intent(in) :: l_bzsym
      30             :       real,intent(in)    :: e1s,e2s,ef
      31             :       integer,intent(in) :: nkpt
      32             : 
      33             :       integer,intent(out):: nbnd
      34             : 
      35             :       integer          :: ikpt,kptibz
      36             :       integer          :: nmat,nbands,nv(jspd)
      37           0 :       real             :: wk, bkpt(3),eig(neigd),cp_time(9)
      38             :       integer          :: k1(nvd,jspd),k2(nvd,jspd),k3(nvd,jspd)
      39             :       integer          :: nkbnd,i
      40             :       REAL             :: ello(nlod,ntypd,jspd),evdu(2,jspd)
      41             :       REAL             :: epar(0:lmaxd,ntypd,jspd)
      42             :       integer          :: n_start,n_end,co
      43             :       integer          :: num_bands
      44             : 
      45           0 :       TYPE(t_mat)      :: zMat
      46             : 
      47           0 :       call timestart("wann_maxbnd")
      48             : 
      49           0 :       zMat%l_real = l_real
      50           0 :       zMat%matsize1 = nbasfcn
      51           0 :       zMat%matsize2 = neigd
      52           0 :       IF(l_real) THEN
      53           0 :          ALLOCATE (zMat%data_r(zMat%matsize1,zMat%matsize2))
      54             :       ELSE
      55           0 :          ALLOCATE (zMat%data_c(zMat%matsize1,zMat%matsize2))
      56             :       END IF
      57             : 
      58           0 :       n_start=1
      59           0 :       n_end=neigd
      60             : 
      61           0 :       nbnd=0
      62           0 :       do ikpt = 1,fullnkpts
      63             : 
      64           0 :         kptibz=ikpt 
      65           0 :         if(l_bzsym) kptibz=irreduc(ikpt)
      66             :             call wann_read_eig(
      67             :      >              eig_id,
      68             :      >              ntypd,neigd,nvd,jspd,
      69             :      >              0,isize,kptibz,jspin,nbasfcn,
      70             :      >              l_ss,l_noco,nrec,
      71             :      <              nmat,nbands,eig,zMat,
      72           0 :      >              l_gwf,iqpt)
      73             : 
      74           0 :         nkbnd = 0
      75           0 :         do i = 1,nbands
      76             :          if((eig(i).ge.e1s .and. nkbnd.lt.numbands.and.l_bynumber).or.
      77           0 :      &      (eig(i).ge.e1s.and.eig(i).le.e2s.and.l_byenergy ).or.
      78           0 :      &      (i.ge.band_min.and.i.le.band_max.and.l_byindex))  then
      79           0 :            nkbnd = nkbnd + 1
      80             :          endif 
      81             :         enddo
      82           0 :         if (nkbnd.ge.nbnd) nbnd = nkbnd
      83             : 
      84             :       enddo !ikpt
      85             : 
      86           0 :       call timestop("wann_maxbnd")
      87           0 :       end subroutine wann_maxbnd
      88             :       END MODULE m_wann_maxbnd

Generated by: LCOV version 1.14