:orphan:
# PetscSFNode
specifier of owner and index 
## Synopsis
```
typedef struct {
  PetscInt rank;  /* Rank of owner */
  PetscInt index; /* Index of node on rank */
} PetscSFNode;
```



## Sample Usage
```none
    PetscSFNode    *remote;
    PetscCall(PetscMalloc1(nleaves,&remote));
    for (i=0; i<size; i++) {
      remote[i].rank = i;
      remote[i].index = rank;
    }
```



## Sample Fortran Usage
```none
    type(PetscSFNode) remote(6)
    remote(1)%rank  = modulo(rank+size-1,size)
    remote(1)%index = 1 * stride
```



## See Also
 `PetscSF`, `PetscSFSetGraph()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscsftypes.h.html#PetscSFNode">include/petscsftypes.h</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/sf/tutorials/ex1f.F90.html">src/vec/is/sf/tutorials/ex1f.F90</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscsftypes.h)


[Index of all PetscSF routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
