Deallocates a DBCSR matrix for compatibility with CP2K
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | POINTER | :: | matrix |
DBCSR matrix |
SUBROUTINE dbcsr_deallocate_matrix(matrix)
!! Deallocates a DBCSR matrix for compatibility with CP2K
TYPE(dbcsr_type), POINTER :: matrix
!! DBCSR matrix
CALL dbcsr_release(matrix)
IF (dbcsr_valid_index(matrix)) &
CALL dbcsr_abort(__LOCATION__, &
'You should not "deallocate" a referenced matrix. '// &
'Avoid pointers to DBCSR matrices.')
DEALLOCATE (matrix)
END SUBROUTINE dbcsr_deallocate_matrix