#pragma once /* MANSEC = Vec */ /* SUBMANSEC = PetscSF */ /*S PetscSF - PETSc object for setting up and managing the communication of certain entries of arrays and `Vec` between MPI ranks. Level: intermediate `PetscSF` uses the concept of star forests to indicate and determine the communication patterns concisely and efficiently. A star forest is simply a collection of trees of height 1. The leave nodes represent "ghost locations" for the root nodes. .seealso: `PetscSFCreate()`, `VecScatter`, `VecScatterCreate()` S*/ typedef struct _p_PetscSF *PetscSF; /*J PetscSFType - String with the name of a `PetscSF` type Level: beginner .seealso: `PetscSFSetType()`, `PetscSF` J*/ typedef const char *PetscSFType; #define PETSCSFBASIC "basic" #define PETSCSFNEIGHBOR "neighbor" #define PETSCSFALLGATHERV "allgatherv" #define PETSCSFALLGATHER "allgather" #define PETSCSFGATHERV "gatherv" #define PETSCSFGATHER "gather" #define PETSCSFALLTOALL "alltoall" #define PETSCSFWINDOW "window" /*S PetscSFNode - specifier of owner and index Level: beginner Sample Usage: .vb PetscSFNode *remote; PetscCall(PetscMalloc1(nleaves,&remote)); for (i=0; i