[petsc-dev] MatMult_Scatter : INSERT_VALUES?

Dave May dave.mayhem23 at gmail.com
Fri Aug 3 03:09:42 CDT 2018


I am wondering why MatMult_Scatter() internally uses ADD_VALUES with
VecScatter{Begin,End} rather than INSERT_VALUES?

In the event that the IS used by the scatter defines duplicate values in
the to[] array, e.g. two ranks define the same value of where to insert a
value, then the current implementation of MatMult_Scatter produces the
incorrect result.

You could argue that the user defined IS is wrong in this case as it
contains duplicate to[] values. My particular use case of MatScatter
relates to defining an injection operator between two DMs. For this case,
I'd argue that that we should just be using INSERT_VALUES rather than
ADD_VALUES inside MatMult_Scatter.


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

More information about the petsc-dev mailing list