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