set_data_p_d Subroutine

private subroutine set_data_p_d(area, p)

Sets a data pointer.

Assumptions Assumes that no memory will be lost when repointing the pointer in the data area and that the area is initialized.

Arguments

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

target data area

real(kind=real_8), DIMENSION(:), POINTER, CONTIGUOUS :: p

source data pointer


Source Code

      SUBROUTINE set_data_p_d (area, p)
     !! Sets a data pointer.
     !!
     !! Assumptions
     !! Assumes that no memory will be lost when repointing the
     !! pointer in the data area and that the area is initialized.

         TYPE(dbcsr_data_obj), INTENT(INOUT)      :: area
        !! target data area
         REAL(kind=real_8), DIMENSION(:), POINTER, CONTIGUOUS :: p
        !! source data pointer

         IF (area%d%data_type /= dbcsr_type_real_8) &
            DBCSR_ABORT("set_data_p_d: data-area has wrong type")

         area%d%r_dp => p
      END SUBROUTINE set_data_p_d