Actual source code: petscsftypes.h
1: #if !defined(PETSCSFTYPES_H)
2: #define PETSCSFTYPES_H
4: /*S
5: PetscSF - PETSc object for setting up and managing the communication of certain entries of arrays and Vecs between MPI processes.
7: Level: intermediate
9: PetscSF uses the concept of star forests to indicate and determine the communication patterns concisely and efficiently.
10: A star https://en.wikipedia.org/wiki/Star_(graph_theory) forest is simply a collection of trees of height 1. The leave nodes represent
11: "ghost locations" for the root nodes.
13: .seealso: PetscSFCreate(), VecScatter, VecScatterCreate()
14: S*/
15: typedef struct _p_PetscSF* PetscSF;
17: /*J
18: PetscSFType - String with the name of a PetscSF type
20: Level: beginner
22: .seealso: PetscSFSetType(), PetscSF
23: J*/
24: typedef const char *PetscSFType;
26: /*S
27: PetscSFNode - specifier of owner and index
29: Level: beginner
31: Sample Usage:
32: $ PetscSFNode *remote;
33: $ PetscMalloc1(nleaves,&remote);
34: $ for (i=0; i<size; i++) {
35: $ remote[i].rank = i;
36: $ remote[i].index = rank;
37: $ }
39: Sample Fortran Usage:
40: $ type(PetscSFNode) remote(6)
41: $ remote(1)%rank = modulo(rank+size-1,size)
42: $ remote(1)%index = 1 * stride
44: .seealso: PetscSFSetGraph()
45: S*/
46: typedef struct {
47: PetscInt rank; /* Rank of owner */
48: PetscInt index; /* Index of node on rank */
49: } PetscSFNode;
51: /*S
52: VecScatter - Object used to manage communication of data
53: between vectors in parallel. Manages both scatters and gathers
55: Level: beginner
57: .seealso: VecScatterCreate(), VecScatterBegin(), VecScatterEnd()
58: S*/
59: typedef PetscSF VecScatter;
61: /*J
62: VecScatterType - String with the name of a PETSc vector scatter type
64: Level: beginner
66: .seealso: VecScatterSetType(), VecScatter, VecScatterCreate(), VecScatterDestroy()
67: J*/
68: typedef PetscSFType VecScatterType;
69: #endif