dbcsr_work_destroy_all Subroutine

private subroutine dbcsr_work_destroy_all(m)

Deallocates and destroys a work matrix.

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_type), intent(inout) :: m

Contents


Source Code

   SUBROUTINE dbcsr_work_destroy_all(m)
      !! Deallocates and destroys a work matrix.
      TYPE(dbcsr_type), INTENT(INOUT)                    :: m

      CHARACTER(len=*), PARAMETER :: routineN = 'dbcsr_work_destroy_all'

      INTEGER                                            :: handle, i

!   ---------------------------------------------------------------------------

      CALL timeset(routineN, handle)

      IF (.NOT. ASSOCIATED(m%wms)) &
         DBCSR_WARN("Want to destroy nonexisting work matrices.")
      IF (ASSOCIATED(m%wms)) THEN
         DO i = 1, SIZE(m%wms)
            CALL dbcsr_work_destroy(m%wms(i))
         END DO
         DEALLOCATE (m%wms)
      END IF

      CALL timestop(handle)

   END SUBROUTINE dbcsr_work_destroy_all