w90_postw90_readwrite_dealloc Subroutine

private subroutine w90_postw90_readwrite_dealloc(exclude_bands, wannier_data, kmesh_input, kpt_latt, dis_manifold, fermi_energy_list, atom_data, eigval, kpoint_path, pw90_dos, pw90_berry, proj_input, error, comm)

Uses

  • proc~~w90_postw90_readwrite_dealloc~~UsesGraph proc~w90_postw90_readwrite_dealloc w90_postw90_readwrite_dealloc module~w90_comms w90_comms proc~w90_postw90_readwrite_dealloc->module~w90_comms module~w90_error w90_error proc~w90_postw90_readwrite_dealloc->module~w90_error 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

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), allocatable :: exclude_bands(:)
type(wannier_data_type), intent(inout) :: wannier_data
type(kmesh_input_type), intent(inout) :: kmesh_input
real(kind=dp), intent(inout), allocatable :: kpt_latt(:,:)
type(dis_manifold_type), intent(inout) :: dis_manifold
real(kind=dp), intent(inout), allocatable :: fermi_energy_list(:)
type(atom_data_type), intent(inout) :: atom_data
real(kind=dp), intent(inout), allocatable :: eigval(:,:)
type(kpoint_path_type), intent(inout) :: kpoint_path
type(pw90_dos_mod_type), intent(inout) :: pw90_dos
type(pw90_berry_mod_type), intent(inout) :: pw90_berry
type(proj_type), intent(inout), allocatable :: proj_input(:)
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Calls

proc~~w90_postw90_readwrite_dealloc~~CallsGraph proc~w90_postw90_readwrite_dealloc w90_postw90_readwrite_dealloc proc~set_error_dealloc set_error_dealloc proc~w90_postw90_readwrite_dealloc->proc~set_error_dealloc proc~w90_readwrite_dealloc w90_readwrite_dealloc proc~w90_postw90_readwrite_dealloc->proc~w90_readwrite_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 proc~w90_readwrite_dealloc->proc~set_error_dealloc

Source Code

  subroutine w90_postw90_readwrite_dealloc(exclude_bands, wannier_data, kmesh_input, kpt_latt, &
                                           dis_manifold, fermi_energy_list, atom_data, eigval, &
                                           kpoint_path, pw90_dos, pw90_berry, proj_input, error, &
                                           comm)
    !================================================!

    use w90_error, only: w90_error_type
    use w90_comms, only: w90_comm_type

    implicit none

    type(wannier_data_type), intent(inout) :: wannier_data
    type(kmesh_input_type), intent(inout) :: kmesh_input
    type(proj_type), allocatable, intent(inout) :: proj_input(:)
    type(dis_manifold_type), intent(inout) :: dis_manifold
    type(atom_data_type), intent(inout) :: atom_data
    type(kpoint_path_type), intent(inout) :: kpoint_path
    type(pw90_dos_mod_type), intent(inout) :: pw90_dos
    type(pw90_berry_mod_type), intent(inout) :: pw90_berry
    type(w90_error_type), allocatable, intent(out) :: error
    type(w90_comm_type), intent(in) :: comm

    integer, allocatable, intent(inout) :: exclude_bands(:)
    real(kind=dp), allocatable, intent(inout) :: kpt_latt(:, :)
    real(kind=dp), allocatable, intent(inout) :: fermi_energy_list(:)
    real(kind=dp), allocatable, intent(inout) :: eigval(:, :)

    integer :: ierr

    call w90_readwrite_dealloc(exclude_bands, wannier_data, proj_input, kmesh_input, kpt_latt, &
                               dis_manifold, atom_data, eigval, kpoint_path, error, comm)
    if (allocated(error)) return
    if (allocated(pw90_dos%project)) then
      deallocate (pw90_dos%project, stat=ierr)
      if (ierr /= 0) then
        call set_error_dealloc(error, 'Error in deallocating dos_project in w90_postw90_readwrite_dealloc', comm)
        return
      end if
    end if
    if (allocated(fermi_energy_list)) then
      deallocate (fermi_energy_list, stat=ierr)
      if (ierr /= 0) then
        call set_error_dealloc(error, 'Error in deallocating fermi_energy_list in w90_postw90_readwrite_dealloc', comm)
        return
      end if
    end if
    if (allocated(pw90_berry%kubo_freq_list)) then
      deallocate (pw90_berry%kubo_freq_list, stat=ierr)
      if (ierr /= 0) then
        call set_error_dealloc(error, 'Error in deallocating kubo_freq_list in w90_postw90_readwrite_dealloc', comm)
        return
      end if
    end if
  end subroutine w90_postw90_readwrite_dealloc