typedef struct { PetscInt rank; /* Rank of owner */ PetscInt index; /* Index of node on rank */ } PetscSFNode;
PetscSFNode *remote;
ierr = PetscMalloc1(nleaves,&remote);CHKERRQ(ierr);
for (i=0; i<size; i++) {
remote[i].rank = i;
remote[i].index = rank;
}
type(PetscSFNode) remote(6)
remote(1)%rank = modulo(rank+size-1,size)
remote(1)%index = 1 * stride