sitesym_replace_d_matrix_band Subroutine

public subroutine sitesym_replace_d_matrix_band(sitesym, num_wann, error, comm)

Uses

  • proc~~sitesym_replace_d_matrix_band~~UsesGraph proc~sitesym_replace_d_matrix_band sitesym_replace_d_matrix_band module~w90_wannier90_types w90_wannier90_types proc~sitesym_replace_d_matrix_band->module~w90_wannier90_types module~w90_constants w90_constants module~w90_wannier90_types->module~w90_constants

Arguments

Type IntentOptional Attributes Name
type(sitesym_type), intent(inout) :: sitesym
integer, intent(in) :: num_wann
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Calls

proc~~sitesym_replace_d_matrix_band~~CallsGraph proc~sitesym_replace_d_matrix_band sitesym_replace_d_matrix_band proc~set_error_alloc set_error_alloc proc~sitesym_replace_d_matrix_band->proc~set_error_alloc proc~set_error_dealloc set_error_dealloc proc~sitesym_replace_d_matrix_band->proc~set_error_dealloc proc~comms_sync_error comms_sync_error proc~set_error_alloc->proc~comms_sync_error proc~set_base_error set_base_error proc~set_error_alloc->proc~set_base_error proc~set_error_dealloc->proc~comms_sync_error proc~set_error_dealloc->proc~set_base_error

Called by

proc~~sitesym_replace_d_matrix_band~~CalledByGraph proc~sitesym_replace_d_matrix_band sitesym_replace_d_matrix_band proc~dis_main dis_main proc~dis_main->proc~sitesym_replace_d_matrix_band proc~w90_disentangle~2 w90_disentangle proc~w90_disentangle~2->proc~dis_main proc~w90_disentangle w90_disentangle proc~w90_disentangle->proc~w90_disentangle~2 program~wannier wannier program~wannier->proc~w90_disentangle~2

Source Code

  subroutine sitesym_replace_d_matrix_band(sitesym, num_wann, error, comm)
    !================================================!

    use w90_wannier90_types, only: sitesym_type

    implicit none

    integer, intent(in) :: num_wann
    type(sitesym_type), intent(inout) :: sitesym
    type(w90_comm_type), intent(in) :: comm
    type(w90_error_type), allocatable, intent(out) :: error

    integer :: ierr

    deallocate (sitesym%d_matrix_band, stat=ierr)
    if (ierr /= 0) then
      call set_error_dealloc(error, 'Error in deallocating sitesym%d_matrix_band in sitesym_replace_d_matrix_band', comm)
      return
    end if
    allocate (sitesym%d_matrix_band(num_wann, num_wann, sitesym%nsymmetry, sitesym%nkptirr), stat=ierr)
    if (ierr /= 0) then
      call set_error_alloc(error, 'Error in allocating sitesym%d_matrix_band in sitesym_replace_d_matrix_band', comm)
      return
    end if

    sitesym%d_matrix_band = sitesym%d_matrix_wann

    return
  end subroutine sitesym_replace_d_matrix_band