dbcsr_block_in_limits Function

private function dbcsr_block_in_limits(row, col, block_row_limits, block_column_limits)

check if a block is not in the limits

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: row
integer, intent(in) :: col
integer, intent(in), optional, DIMENSION(2) :: block_row_limits
integer, intent(in), optional, DIMENSION(2) :: block_column_limits

Return Value logical


Source Code

   FUNCTION dbcsr_block_in_limits(row, col, block_row_limits, block_column_limits)
      !! check if a block is not in the limits
      INTEGER, INTENT(in)                                :: row, col
      INTEGER, DIMENSION(2), INTENT(in), OPTIONAL        :: block_row_limits, block_column_limits
      LOGICAL                                            :: dbcsr_block_in_limits

      dbcsr_block_in_limits = .TRUE.
      IF (PRESENT(block_row_limits)) THEN
         IF (row .LT. block_row_limits(1)) dbcsr_block_in_limits = .FALSE.
         IF (row .GT. block_row_limits(2)) dbcsr_block_in_limits = .FALSE.
      END IF
      IF (PRESENT(block_column_limits)) THEN
         IF (col .LT. block_column_limits(1)) dbcsr_block_in_limits = .FALSE.
         IF (col .GT. block_column_limits(2)) dbcsr_block_in_limits = .FALSE.
      END IF
   END FUNCTION dbcsr_block_in_limits