#include "petscsf.h" PetscErrorCode PetscSFGetGraph(PetscSF sf,PetscInt *nroots,PetscInt *nleaves,const PetscInt **ilocal,const PetscSFNode **iremote)Not Collective
sf | - star forest |
nroots | - number of root vertices on the current process (these are possible targets for other process to attach leaves) | |
nleaves | - number of leaf vertices on the current process, each of these references a root on any process | |
ilocal | - locations of leaves in leafdata buffers | |
iremote | - remote locations of root vertices for each leaf on the current process |
When called from Fortran, the returned iremote array is a copy and must be deallocated after use. Consequently, if you want to update the graph, you must call PetscSFSetGraph after modifying the iremote array.