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

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



On Tue, Jan 22, 2019 at 5:07 PM Jed Brown <jed at jedbrown.org<mailto:jed at jedbrown.org>> wrote:
"Zhang, Junchao" <jczhang at mcs.anl.gov<mailto:jczhang at mcs.anl.gov>> writes:

> On Tue, Jan 22, 2019 at 4:08 PM Jed Brown <jed at jedbrown.org<mailto:jed at jedbrown.org><mailto:jed at jedbrown.org<mailto:jed at jedbrown.org>>> wrote:
>> It is not supported at this time.  What does your use case look like?
>> Do roots have degree greater than 1?
>
> Yes. Imagine a vecscatter x[0]->y[0], x[1]->y[0], x[1]->y[1],x[2]->y[1]. I build an SF for SCATTER_FORWARD. Now I wan to do SCATTER_REVERSE with ADD_VALUES.
> To solve this problem without creating another SF and without breaking current SF API, I propose to add PetscSFBcastAndOp(sf, unit, rootdata, leafdata, op)

Is this pattern needed for some algorithm or application or is this
about implementing the full VecScatter interface (modulo ill-defined
operations) in terms of SF?  If the former, I'd like to understand it.
If the latter, I'm okay with you extending the interface as proposed.
It is the latter.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190122/f71b6837/attachment.html>


More information about the petsc-dev mailing list