dealloc_en_pert_t Subroutine

public subroutine dealloc_en_pert_t(en_pert)

Uses

Arguments

Type IntentOptional Attributes Name
type(en_pert_t), intent(inout) :: en_pert

Contents

Source Code


Source Code

    subroutine dealloc_en_pert_t(en_pert)

        ! Deallocate an en_pert_t object.

        ! In/Out: en_pert - en_pert_t object to be deallocated.

        use hash, only: clear_hash_table

        type(en_pert_t), intent(inout) :: en_pert

        integer :: ierr

        if (allocated(en_pert%dets)) deallocate(en_pert%dets, stat=ierr)

        call clear_hash_table(en_pert%hash_table)
        deallocate(en_pert%hash_table, stat=ierr)
        nullify (en_pert%hash_table)

    end subroutine dealloc_en_pert_t