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/vec/is/sf/tutorials/ex1f.F90


Edit on GitLab

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