Skip to main content
`Ctrl`+`K`

# PetscSFCreateEmbeddedLeafSF

removes edges from all but the selected leaves of a `PetscSF`, does not remap indices

## Synopsis

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

Collective

## Input Parameters

- sf - original star forest

- nselected - number of selected leaves on this MPI process

- selected - indices of the selected leaves on this MPI process

## Output Parameter

- newsf - new star forest

## See Also

PetscSF - an alternative to low-level MPI calls for data communication, `PetscSF`, `PetscSFCreateEmbeddedRootSF()`, `PetscSFSetGraph()`, `PetscSFGetGraph()`

## Level

advanced

## 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