petsc-3.7.1 2016-05-15
Report Typos and Errors

ISCreateBlock

Creates a data structure for an index set containing a list of integers. The indices are relative to entries, not blocks.

Synopsis

#include "petscis.h"     
PetscErrorCode  ISCreateBlock(MPI_Comm comm,PetscInt bs,PetscInt n,const PetscInt idx[],PetscCopyMode mode,IS *is)
Collective on MPI_Comm Many br

Input Parameters

comm - the MPI communicator Many br
bs - number of elements in each block Many br
n - the length of the index set (the number of blocks) Many br
idx - the list of integers, one for each block and count of block not indices Many br
mode - see PetscCopyMode, only PETSC_COPY_VALUES and PETSC_OWN_POINTER are supported in this routine Many br

Output Parameter

is -the new index set Many br

Notes

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

Example

If you wish to index the values {0,1,6,7}, then use Many bra block size of 2 and idx of {0,3}. Many br

Many br

See Also

ISCreateStride(), ISCreateGeneral(), ISAllGather()

Level:beginner
Location:
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

Examples

src/vec/is/is/examples/tutorials/ex3.c.html
src/vec/is/is/examples/tutorials/ex3f90.F.html