[petsc-dev] How to add root values to leaves in PetscSF?

Zhang, Junchao jczhang at mcs.anl.gov
Tue Jan 22 13:17:15 CST 2019


I want to add root values to leaves, and keep root unchanged. PetscSFBcast came to my mind, but unfortunately it only broadcasts roots and does not have an MPI_Op argument like PetscSFReduce for me to choose from INSERT_VALUES, ADD_VALUES, etc.
Any tips? Thanks.

PS: I met this problem when I tried to implement VecScatter in SF.  In VecScatter, multiple entries of vec x can be scattered to the same entry of vec y, and one entry of x can also be scattered to multiple entries of y.  I want to use one SF for all combinations of SCATTER_FORWARD/BACKWARD, INSERT/ADD_VALUES. It seems impossible with current SF interface.
--Junchao Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190122/da18f0d2/attachment.html>


More information about the petsc-dev mailing list