dbcsr_destroy_2d_array Subroutine

private subroutine dbcsr_destroy_2d_array(marray)

Releases all matrices in 2-d array.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_2d_array_type), intent(inout) :: marray

matrix array


Source Code

   SUBROUTINE dbcsr_destroy_2d_array(marray)
      !! Releases all matrices in 2-d array.

      TYPE(dbcsr_2d_array_type), INTENT(INOUT)           :: marray
         !! matrix array

      INTEGER                                            :: col, row

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

      DO row = LBOUND(marray%mats, 1), UBOUND(marray%mats, 1)
         DO col = LBOUND(marray%mats, 2), UBOUND(marray%mats, 2)
            CALL dbcsr_destroy(marray%mats(row, col), force=.TRUE.)
         END DO
      END DO
      CALL dbcsr_image_dist_release(marray%image_dist)
      DEALLOCATE (marray%mats)
   END SUBROUTINE dbcsr_destroy_2d_array