local_filter_sp Subroutine

private pure subroutine local_filter_sp(full_data, nle, local_elements, local_data)

Gathers the local elements from all data (full_data) for single precision elements.

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in), DIMENSION(:) :: full_data
integer, intent(in) :: nle
integer, intent(in), DIMENSION(1:nle) :: local_elements
real(kind=sp), intent(out), DIMENSION(1:nle) :: local_data

Source Code

   PURE SUBROUTINE local_filter_sp(full_data, nle, local_elements, local_data)
      !! Gathers the local elements from all data (full_data) for
      !! single precision elements.

      REAL(KIND=sp), DIMENSION(:), INTENT(IN)            :: full_data
      INTEGER, INTENT(IN)                                :: nle
      INTEGER, DIMENSION(1:nle), INTENT(IN)              :: local_elements
      REAL(KIND=sp), DIMENSION(1:nle), INTENT(OUT)       :: local_data

      INTEGER                                            :: l

      DO l = 1, SIZE(local_data)
         local_data(l) = full_data(local_elements(l))
      END DO
   END SUBROUTINE local_filter_sp