dbcsr_deallocate_matrix Subroutine

public subroutine dbcsr_deallocate_matrix(matrix)

Deallocates a DBCSR matrix for compatibility with CP2K

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), POINTER :: matrix

DBCSR matrix


Source Code

   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