Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in), | optional | :: | lwindow_in(num_bands,num_kpts) |
subroutine sitesym_slim_d_matrix_band(lwindow_in)
!==================================================================!
use w90_parameters, only: num_bands, num_kpts
implicit none
logical, optional, intent(in) :: lwindow_in(num_bands, num_kpts)
integer :: ik, i, j, nb, ir
integer :: nindx(num_bands)
!write(stdout,"(a)") '-- sitesym_slim_d_matrix_band --'
do ir = 1, nkptirr
ik = ir2ik(ir)
j = 0
do i = 1, num_bands
if (lwindow_in(i, ik)) then
j = j + 1
nindx(j) = i
endif
enddo
nb = j
do j = 1, nb
i = nindx(j)
d_matrix_band(1:nb, j, :, ir) = d_matrix_band(nindx(1:nb), i, :, ir)
if (nb .lt. num_bands) then
d_matrix_band(nb + 1:, j, :, ir) = 0
endif
enddo
enddo
return
end subroutine sitesym_slim_d_matrix_band