nfull_elements Function

public pure function nfull_elements(all_offsets, local_elements)

The sum of a subset of rows/columns \return sum of sizes of local elements

Arguments

TypeIntentOptionalAttributesName
integer, intent(in), DIMENSION(:):: all_offsets

ordered offsets of all the elements enumerated local elements

integer, intent(in), DIMENSION(:):: local_elements

ordered offsets of all the elements enumerated local elements

Return Value integer


Contents

Source Code


Source Code

   PURE FUNCTION nfull_elements(all_offsets, local_elements)
      !! The sum of a subset of rows/columns
      !! \return sum of sizes of local elements
      !! @note Used for making matrices dense/undense

      INTEGER, DIMENSION(:), INTENT(IN)                  :: all_offsets, local_elements
         !! ordered offsets of all the elements
         !! enumerated local elements
      INTEGER                                            :: nfull_elements

      INTEGER                                            :: el, lel

      nfull_elements = 0
      DO lel = 1, SIZE(local_elements)
         el = local_elements(lel)
         nfull_elements = nfull_elements + all_offsets(el + 1) - all_offsets(el)
      END DO
   END FUNCTION nfull_elements