get_data_z Subroutine

private subroutine get_data_z(area, DATA, lb, ub)

Returns the single/double precision real/complex data

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_data_obj), intent(in) :: area

data area

complex(kind=real_8), DIMENSION(:), POINTER:: DATA

pointer to data

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


Contents

Source Code


Source Code

      SUBROUTINE get_data_z (area, DATA, lb, ub)
     !! Returns the single/double precision real/complex data

         TYPE(dbcsr_data_obj), INTENT(IN)  :: area
        !! data area
         COMPLEX(kind=real_8), DIMENSION(:), POINTER    :: 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_8) &
               DBCSR_ABORT("get_data_z: data-area has wrong type")
            IF (PRESENT(lb) .OR. PRESENT(ub)) THEN
               l = LBOUND(area%d%c_dp, 1)
               IF (PRESENT(lb)) l = lb
               u = UBOUND(area%d%c_dp, 1)
               IF (PRESENT(ub)) u = ub
               IF (debug_mod) THEN
                  IF (l < LBOUND(area%d%c_dp, 1)) &
                     DBCSR_ABORT("Out of bounds")
                  IF (u > UBOUND(area%d%c_dp, 1)) &
                     DBCSR_ABORT("Out of bounds")
               END IF
               DATA => area%d%c_dp (l:u)
            ELSE
               DATA => area%d%c_dp
            END IF
         ELSE
            NULLIFY (DATA)
         END IF
      END SUBROUTINE get_data_z