Deallocates and destroys a work matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_work_type), | intent(inout) | :: | wm |
work matrix |
SUBROUTINE dbcsr_work_destroy(wm) !! Deallocates and destroys a work matrix. TYPE(dbcsr_work_type), INTENT(INOUT) :: wm !! work matrix CHARACTER(len=*), PARAMETER :: routineN = 'dbcsr_work_destroy' INTEGER :: handle ! --------------------------------------------------------------------------- IF (careful_mod) CALL timeset(routineN, handle) IF (ASSOCIATED(wm%row_i)) THEN DEALLOCATE (wm%row_i) END IF IF (ASSOCIATED(wm%col_i)) THEN DEALLOCATE (wm%col_i) END IF IF (ASSOCIATED(wm%blk_p)) THEN DEALLOCATE (wm%blk_p) END IF CALL dbcsr_data_release(wm%data_area) CALL dbcsr_mutable_destroy(wm%mutable) IF (careful_mod) CALL timestop(handle) END SUBROUTINE dbcsr_work_destroy