[petsc-dev] MATSCATTER Transpose

Dima Karpeyev karpeev at gmail.com
Mon Mar 29 16:29:55 CDT 2010

I can work within MATSCATTER, but the question is what is the
VecScatter returned by
MatScatterGetVecScatter applied to such a transposed MATSCATTER?

I guess it can be clarified in documentation that extracting this
scatter from B, which is
MATSCATTER and a transpose of another MATSCATTER A, then using it
in another MatCreateScatter call (or its equivalent) will reproduce
not B, but A.


On Mon, Mar 29, 2010 at 3:23 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> On Mar 29, 2010, at 2:42 PM, Dmitry Karpeev wrote:
>> Good point.  Actually, should this be pushed all the way to the level
>> of VecScatter?
>> That would necessitate an introduction of something like
>> VecScatterTranspose
>> (by analogy with the induced linear operator) or VecScatterInvert.
>> The implementation of VecScatterTranspose is trivially carried out at
>> the interface level
>> with a flag, which would cause an appropriate change in the
>> ScatterMode submitted to
>> ops->scatterbegin, ops->scatterend.
>   Yuck, unless there is a good reason for VecScatterInvert/Transpose?() I'd
> much prefer that you just work inside the MATSCATTER matrix implementation.
>   Barry
>> Then, MatTranspose for MATSCATTER could be implemented by transposing
>> the underlying
>> VecScatter (incurring extra storage) or transposing the underlying
>> scatter on MatScatterGetVecScatter
>> (this is much less clean, though).
>> Any thoughts?
>> Thanks.
>> Dmitry.
>> On Mon, Mar 29, 2010 at 1:14 PM, Jed Brown <jed at 59a2.org> wrote:
>>> On Mon, 29 Mar 2010 12:57:53 -0600, Dmitry Karpeev <karpeev at mcs.anl.gov>
>>> wrote:
>>>> Is there any reason why MATSCATTER doesn't implement MatTranspose?
>>>> It seems to me that it would be easy to accomplish by reversing
>>>> MatMultXXX and MatMultTransposeXXX
>>>> in MATSCATTER's ops vtable.
>>> Makes sense to me, just be careful with MatScatterGetVecScatter().
>>> Jed

More information about the petsc-dev mailing list