clean_ws_translate Subroutine

public subroutine clean_ws_translate(ws_distance, error, comm)

Uses

  • proc~~clean_ws_translate~~UsesGraph proc~clean_ws_translate clean_ws_translate module~w90_comms w90_comms proc~clean_ws_translate->module~w90_comms module~w90_error w90_error proc~clean_ws_translate->module~w90_error module~w90_types w90_types proc~clean_ws_translate->module~w90_types module~w90_constants w90_constants module~w90_comms->module~w90_constants module~w90_error_base w90_error_base module~w90_comms->module~w90_error_base module~w90_error->module~w90_comms module~w90_error->module~w90_error_base module~w90_types->module~w90_constants

Arguments

Type IntentOptional Attributes Name
type(ws_distance_type), intent(inout) :: ws_distance
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Calls

proc~~clean_ws_translate~~CallsGraph proc~clean_ws_translate clean_ws_translate proc~set_error_dealloc set_error_dealloc proc~clean_ws_translate->proc~set_error_dealloc proc~comms_sync_error comms_sync_error proc~set_error_dealloc->proc~comms_sync_error proc~set_base_error set_base_error proc~set_error_dealloc->proc~set_base_error

Called by

proc~~clean_ws_translate~~CalledByGraph proc~clean_ws_translate clean_ws_translate proc~ws_translate_dist ws_translate_dist proc~ws_translate_dist->proc~clean_ws_translate proc~plot_interpolate_bands plot_interpolate_bands proc~plot_interpolate_bands->proc~ws_translate_dist proc~plot_main plot_main proc~plot_main->proc~ws_translate_dist proc~plot_main->proc~plot_interpolate_bands proc~pw90common_wanint_setup pw90common_wanint_setup proc~pw90common_wanint_setup->proc~ws_translate_dist proc~w90_plot w90_plot proc~w90_plot->proc~plot_main program~postw90 postw90 program~postw90->proc~pw90common_wanint_setup program~wannier wannier program~wannier->proc~w90_plot

Source Code

  subroutine clean_ws_translate(ws_distance, error, comm)
    !================================================!
    use w90_types, only: ws_distance_type
    use w90_comms, only: w90_comm_type
    use w90_error, only: w90_error_type, set_error_dealloc

    implicit none

    type(ws_distance_type), intent(inout) :: ws_distance
    type(w90_error_type), allocatable, intent(out) :: error
    type(w90_comm_type), intent(in) :: comm

    integer :: ierr

    ws_distance%done = .false.
    if (allocated(ws_distance%irdist)) then
      deallocate (ws_distance%irdist, stat=ierr)
      if (ierr /= 0) then
        call set_error_dealloc(error, 'Error in deallocating ws_distance%irdist in clean_ws_translate', comm)
        return
      end if
    end if
    if (allocated(ws_distance%ndeg)) then
      deallocate (ws_distance%ndeg, stat=ierr)
      if (ierr /= 0) then
        call set_error_dealloc(error, 'Error in deallocating ws_distance%ndeg in clean_ws_translate', comm)
        return
      end if
    end if
    if (allocated(ws_distance%crdist)) then
      deallocate (ws_distance%crdist, stat=ierr)
      if (ierr /= 0) then
        call set_error_dealloc(error, 'Error in deallocating ws_distance%crdist in clean_ws_translate', comm)
        return
      end if
    end if

    !================================================!
  end subroutine clean_ws_translate