sitesym_slim_d_matrix_band Subroutine

public subroutine sitesym_slim_d_matrix_band(lwindow_in)

Uses

  • proc~~sitesym_slim_d_matrix_band~~UsesGraph proc~sitesym_slim_d_matrix_band sitesym_slim_d_matrix_band module~w90_parameters w90_parameters proc~sitesym_slim_d_matrix_band->module~w90_parameters module~w90_constants w90_constants module~w90_parameters->module~w90_constants module~w90_io w90_io module~w90_parameters->module~w90_io module~w90_io->module~w90_constants

Arguments

Type IntentOptional AttributesName
logical, intent(in), optional :: lwindow_in(num_bands,num_kpts)

Contents


Source Code

  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