petsc-3.10.5 2019-03-28
Report Typos and Errors

ISBlockSetIndices

The indices are relative to entries, not blocks.

Synopsis

#include "petscis.h"     
PetscErrorCode  ISBlockSetIndices(IS is,PetscInt bs,PetscInt n,const PetscInt idx[],PetscCopyMode mode)
Collective on IS

Input Parameters

Notes

When the communicator is not MPI_COMM_SELF, the operations on the index sets, IS, are NOT conceptually the same as MPI_Group operations. The index sets are then distributed sets of indices and thus certain operations on them are collective.

Example

If you wish to index the values {0,1,4,5}, then use a block size of 2 and idx of {0,2}.

See Also

ISCreateStride(), ISCreateGeneral(), ISAllGather()

Level

beginner

Location

src/vec/is/is/impls/block/block.c

Implementations

ISBlockSetIndices_Block in src/vec/is/is/impls/block/block.c

Index of all IS routines
Table of Contents for all manual pages
Index of all manual pages
is - the index set
bs - number of elements in each block, one for each block and count of block not indices
n - the length of the index set (the number of blocks)
idx - the list of integers, these are by block, not by location + mode - see PetscCopyMode, only PETSC_COPY_VALUES and PETSC_OWN_POINTER are supported