PETSc version 3.17.5
ISGetPointRange
Returns a description of the points in an IS suitable for traversal
Synopsis
#include "petscis.h"
PetscErrorCode ISGetPointRange(IS pointIS, PetscInt *pStart, PetscInt *pEnd, const PetscInt **points)
Not collective
Input Parameter
Output Parameters
| pStart | - The first index, see notes
|
| pEnd | - One past the last index, see notes
|
| points | - The indices, see notes
|
Notes
If the IS contains contiguous indices in an ISSTRIDE, then the indices are contained in [pStart, pEnd) and points = NULL. Otherwise, pStart = 0, pEnd = numIndices, and points is an array of the indices. This supports the following pattern
ISGetPointRange(is, &pStart, &pEnd, &points);
for (p = pStart; p < pEnd; ++p) {
const PetscInt point = points ? points[p] : p;
}
ISRestorePointRange(is, &pstart, &pEnd, &points);
See Also
ISRestorePointRange(), ISGetPointSubrange(), ISGetIndices(), ISCreateStride()
Level
intermediate
Location
src/vec/is/utils/isltog.c
Index of all IS routines
Table of Contents for all manual pages
Index of all manual pages