xref: /petsc/include/petscsftypes.h (revision 799f573fa13a42a08cb02d481bd5ccdbaebf48f2)
10c312b8eSJed Brown #if !defined(_PETSCSFTYPES_H)
20c312b8eSJed Brown #define _PETSCSFTYPES_H
30c312b8eSJed Brown 
40c312b8eSJed Brown /*S
50c312b8eSJed Brown    PetscSF - PETSc object for setting up and managing the communication of certain entries of arrays and Vecs between MPI processes.
60c312b8eSJed Brown 
70c312b8eSJed Brown    Level: intermediate
80c312b8eSJed Brown 
90c312b8eSJed Brown   Concepts: star forest
100c312b8eSJed Brown 
110c312b8eSJed Brown        PetscSF uses the concept of star forests to indicate and determine the communication patterns concisely and efficiently.
120c312b8eSJed Brown   A star  http://en.wikipedia.org/wiki/Star_(graph_theory) forest is simply a collection of trees of height 1. The leave nodes represent
130c312b8eSJed Brown   "ghost locations" for the root nodes.
140c312b8eSJed Brown 
150c312b8eSJed Brown .seealso: PetscSFCreate(), VecScatter, VecScatterCreate()
160c312b8eSJed Brown S*/
170c312b8eSJed Brown typedef struct _p_PetscSF* PetscSF;
180c312b8eSJed Brown 
19*799f573fSMatthew G. Knepley /*S
20*799f573fSMatthew G. Knepley    PetscSFNode - specifier of owner and index
21*799f573fSMatthew G. Knepley 
22*799f573fSMatthew G. Knepley    Level: beginner
23*799f573fSMatthew G. Knepley 
24*799f573fSMatthew G. Knepley   Concepts: indexing, stride, distribution
25*799f573fSMatthew G. Knepley 
26*799f573fSMatthew G. Knepley .seealso: PetscSFSetGraph()
27*799f573fSMatthew G. Knepley S*/
28*799f573fSMatthew G. Knepley typedef struct {
29*799f573fSMatthew G. Knepley   PetscInt rank;                /* Rank of owner */
30*799f573fSMatthew G. Knepley   PetscInt index;               /* Index of node on rank */
31*799f573fSMatthew G. Knepley } PetscSFNode;
32*799f573fSMatthew G. Knepley 
330c312b8eSJed Brown #endif
34