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

# PetscSFSetGraph

Set a parallel star forest

### Synopsis

    #include "petscsf.h"
    PetscErrorCode PetscSFSetGraph(PetscSF sf,PetscInt nroots,PetscInt nleaves,const PetscInt *ilocal,PetscCopyMode localmode,const PetscSFNode *iremote,PetscCopyMode remotemode)

Collective Many br

### Input Arguments

| sf | - star forest Many br
| nroots | - number of root vertices on the current process (these are possible targets for other process to attach leaves) Many br
| nleaves | - number of leaf vertices on the current process, each of these references a root on any process Many br
| ilocal | - locations of leaves in leafdata buffers, pass NULL for contiguous storage Many br
| localmode | - copy mode for ilocal Many br
| iremote | - remote locations of root vertices for each leaf on the current process Many br
| remotemode | - copy mode for iremote Many br

Many br

### See Also

PetscSFCreate(), PetscSFView(), PetscSFGetGraph()

Level:intermediate
Location:src/vec/is/sf/interface/sf.c
Index of all PetscSF routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/vec/is/sf/examples/tutorials/ex1.c.html
src/vec/is/sf/examples/tutorials/ex2.c.html
src/ts/examples/tutorials/ex11.c.html