petsc-3.12.4 2020-02-04
Report Typos and Errors

# PetscSFCreateEmbeddedSF

removes edges from all but the selected roots, does not remap indices

### Synopsis

    #include "petscsf.h"
    PetscErrorCode PetscSFCreateEmbeddedSF(PetscSF sf,PetscInt nselected,const PetscInt *selected,PetscSF *newsf)

Collective

### Input Arguments

| sf | - original star forest
| nselected | - number of selected roots on this process
| selected | - indices of the selected roots on this process

### Output Arguments

newsf -new star forest

### Note

To use the new PetscSF, it may be necessary to know the indices of the leaves that are still participating. This can be done by calling PetscSFGetGraph().

### See Also

PetscSFSetGraph(), PetscSFGetGraph()

### Level

advanced

### Location

src/vec/is/sf/interface/sf.c

### Examples

src/vec/is/sf/examples/tutorials/ex1.c.html

### Implementations

PetscSFCreateEmbeddedSF_Alltoall in src/vec/is/sf/impls/basic/alltoall/sfalltoall.c
PetscSFCreateEmbeddedSF_Basic in src/vec/is/sf/impls/basic/sfbasic.c
Index of all PetscSF routines
Table of Contents for all manual pages
Index of all manual pages