dbcsr_get_data_p_c Function

public function dbcsr_get_data_p_c(area, lb, ub) result(DATA)

Returns the single/double precision real/complex data \brief dbcsr_get_data_c_c

Calling This routine can be called explicitly.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_data_obj), intent(in) :: area

data area

integer, intent(in), optional :: lb

lower bound for pointer upper bound for pointer

integer, intent(in), optional :: ub

lower bound for pointer upper bound for pointer

Return Value complex(kind=real_4), DIMENSION(:), POINTER, CONTIGUOUS

pointer to data


Source Code

      FUNCTION dbcsr_get_data_p_c (area, lb, ub) RESULT(DATA)
     !! Returns the single/double precision real/complex data
     !! \brief dbcsr_get_data_c_c
     !!
     !! Calling
     !! This routine can be called explicitly.

         TYPE(dbcsr_data_obj), INTENT(IN)         :: area
        !! data area
         COMPLEX(kind=real_4), DIMENSION(:), POINTER, CONTIGUOUS :: DATA
        !! pointer to data
         INTEGER, INTENT(IN), OPTIONAL  :: lb, ub
        !! lower bound for pointer
        !! upper bound for pointer

         INTEGER                        :: l, u
!   ---------------------------------------------------------------------------

         IF (ASSOCIATED(area%d)) THEN
            IF (area%d%data_type /= dbcsr_type_complex_4) &
               DBCSR_ABORT("dbcsr_get_data_p_c: data-area has wrong type")
            IF (PRESENT(lb) .OR. PRESENT(ub)) THEN
               l = LBOUND(area%d%c_sp, 1)
               IF (PRESENT(lb)) l = lb
               u = UBOUND(area%d%c_sp, 1)
               IF (PRESENT(ub)) u = ub
               IF (debug_mod) THEN
                  IF (l .LT. LBOUND(area%d%c_sp, 1)) &
                     DBCSR_ABORT("Out of bounds")
                  IF (u .GT. UBOUND(area%d%c_sp, 1)) &
                     DBCSR_ABORT("Out of bounds")
               END IF
               DATA => area%d%c_sp (l:u)
            ELSE
               DATA => area%d%c_sp
            END IF
         ELSE
            NULLIFY (DATA)
         END IF
      END FUNCTION dbcsr_get_data_p_c