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

See Also#

PetscSF, PetscSFSetGraph()

Level#

beginner

Location#

include/petscsftypes.h

Examples#

src/dm/tutorials/swarm_ex3.c
src/ts/tutorials/ex11_sa.c
src/vec/is/sf/tutorials/ex1.c
src/vec/is/sf/tutorials/ex2.c
src/vec/is/sf/tutorials/ex3.c


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