dbcsr_get_block_index Subroutine

public pure subroutine dbcsr_get_block_index(matrix, row, column, stored_row, stored_column, transpose, found, block_number, data_offset)

Looks up a block's index given logical coordinates.

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_type), intent(in) :: matrix

DBCSR matrix

integer, intent(in) :: row

logical row logical column

integer, intent(in) :: column

logical row logical column

integer, intent(out) :: stored_row

row where block is actually stored column where block is actually stored

integer, intent(out) :: stored_column

row where block is actually stored column where block is actually stored

logical, intent(out) :: transpose

whether the data must be transposed whether the block was found

logical, intent(out) :: found

whether the data must be transposed whether the block was found

integer, intent(out) :: block_number

returns the block number of the row and column

integer, intent(out), optional :: data_offset

data offset for the block; 0 if nonexistent


Contents

Source Code


Source Code

   PURE SUBROUTINE dbcsr_get_block_index(matrix, row, column, stored_row, &
                                         stored_column, transpose, found, block_number, data_offset)
      !! Looks up a block's index given logical coordinates.

      TYPE(dbcsr_type), INTENT(IN)                       :: matrix
         !! DBCSR matrix
      INTEGER, INTENT(IN)                                :: row, column
         !! logical row
         !! logical column
      INTEGER, INTENT(OUT)                               :: stored_row, stored_column
         !! row where block is actually stored
         !! column where block is actually stored
      LOGICAL, INTENT(OUT)                               :: transpose, found
         !! whether the data must be transposed
         !! whether the block was found
      INTEGER, INTENT(OUT)                               :: block_number
         !! returns the block number of the row and column
      INTEGER, INTENT(OUT), OPTIONAL                     :: data_offset
         !! data offset for the block; 0 if nonexistent

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

      stored_row = row
      stored_column = column
      transpose = .FALSE.
      CALL dbcsr_get_stored_coordinates(matrix, stored_row, stored_column)
      CALL dbcsr_get_stored_block_info(matrix, stored_row, stored_column, &
                                       found, block_number, data_offset=data_offset, transposed=transpose)
   END SUBROUTINE dbcsr_get_block_index