The sum of a subset of rows/columns \return sum of sizes of local elements
Note
Used for making matrices dense/undense
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
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