tran_dealloc Subroutine

public subroutine tran_dealloc()

Uses

  • proc~~tran_dealloc~~UsesGraph proc~tran_dealloc tran_dealloc module~w90_io w90_io proc~tran_dealloc->module~w90_io module~w90_constants w90_constants module~w90_io->module~w90_constants

Dellocate module data

Arguments

None

Called by

proc~~tran_dealloc~~CalledByGraph proc~tran_dealloc tran_dealloc program~wannier wannier program~wannier->proc~tran_dealloc

Contents

Source Code


Source Code

  subroutine tran_dealloc()
    !! Dellocate module data
    !====================================!

    use w90_io, only: io_error

    implicit none

    integer :: ierr

    if (allocated(hR1)) then
      deallocate (hR1, stat=ierr)
      if (ierr /= 0) call io_error('Error in deallocating hR1 in tran_dealloc')
    end if
    if (allocated(hR0)) then
      deallocate (hR0, stat=ierr)
      if (ierr /= 0) call io_error('Error in deallocating hR0 in tran_dealloc')
    end if
    if (allocated(hL1)) then
      deallocate (hL1, stat=ierr)
      if (ierr /= 0) call io_error('Error in deallocating hL1 in tran_dealloc')
    end if
    if (allocated(hB1)) then
      deallocate (hB1, stat=ierr)
      if (ierr /= 0) call io_error('Error in deallocating hB1 in tran_dealloc')
    end if
    if (allocated(hB0)) then
      deallocate (hB0, stat=ierr)
      if (ierr /= 0) call io_error('Error in deallocating hB0 in tran_dealloc')
    end if
    if (allocated(hr_one_dim)) then
      deallocate (hr_one_dim, stat=ierr)
      if (ierr /= 0) call io_error('Error in deallocating hr_one_dim in tran_dealloc')
    end if

    return

  end subroutine tran_dealloc