Set a parallel star forest
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, pass
NULLfor contiguous storage (locations must be >= 0, enforced during setup in debug mode)
localmode - copy mode for
iremote - remote locations of root vertices for each leaf on the current process (locations must be >= 0, enforced during setup in debug mode)
remotemode - copy mode for
Leaf indices in
ilocal must be unique, otherwise an error occurs.
iremote follow the
In particular, if
PETSc might modify the respective array;
PETSC_USE_POINTER, the user must delete the array after
PETSC_COPY_VALUES is used, the respective array is guaranteed to stay intact and a const array can be passed (but a cast to non-const is needed).
In Fortran you must use
We sort leaves to check for duplicates and contiguousness and to find minleaf/maxleaf.
This also allows to compare leaf sets of two