PetscSFDuplicate — PETSc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# PetscSFDuplicate

duplicate a `PetscSF`, optionally preserving rank connectivity and graph

## Synopsis

    #include "petscsf.h"
    PetscErrorCode PetscSFDuplicate(PetscSF sf, PetscSFDuplicateOption opt, PetscSF *newsf)

Collective

## Input Parameters

- sf - communication object to duplicate

- opt - `PETSCSF_DUPLICATE_CONFONLY`, `PETSCSF_DUPLICATE_RANKS`, or `PETSCSF_DUPLICATE_GRAPH` (see `PetscSFDuplicateOption`)

## Output Parameter

- newsf - new communication object

## See Also

PetscSF - an alternative to low-level MPI calls for data communication, `PetscSF`, `PetscSFType`, `PetscSFCreate()`, `PetscSFSetType()`, `PetscSFSetGraph()`

## Level

beginner

## Location

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

## Implementations

PetscSFDuplicate_Window() in src/vec/is/sf/impls/window/sfwindow.c

Index of all PetscSF routines
Table of Contents for all manual pages
Index of all manual pages