PetscSFNode#
specifier of owner and index
Synopsis#
typedef struct {
PetscInt rank; /* Rank of owner */
PetscInt index; /* Index of node on rank */
} PetscSFNode;
Sample Usage#
PetscSFNode *remote;
PetscCall(PetscMalloc1(nleaves,&remote));
for (i=0; i<size; i++) {
remote[i].rank = i;
remote[i].index = rank;
}
Sample Fortran Usage#
type(PetscSFNode) remote(6)
remote(1)%rank = modulo(rank+size-1,size)
remote(1)%index = 1 * stride
Notes#
Use MPIU_SF_NODE
when performing MPI operations on arrays of PetscSFNode
Generally the values of rank
should be in \([ 0,size)\) and the value of index
greater than or equal to 0, but there are some situations that violate this.
See Also#
Level#
beginner
Location#
Examples#
src/ts/tutorials/ex11_sa.c
src/dm/tutorials/swarm_ex3.c
src/vec/is/sf/tutorials/ex3.c
src/vec/is/sf/tutorials/ex2.c
src/vec/is/sf/tutorials/ex1.c
Index of all PetscSF routines
Table of Contents for all manual pages
Index of all manual pages