[petsc-users] Equivalent of VecScatter for index sets

Matthew Knepley knepley at gmail.com
Mon Jan 13 15:15:13 CST 2014


On Mon, Jan 13, 2014 at 2:27 PM, Rémi Lacroix <remi.lacroix at inria.fr> wrote:

>  Le 13/01/2014 19:00, Matthew Knepley a écrit :
>
>  On Mon, Jan 13, 2014 at 9:47 AM, Rémi Lacroix <remi.lacroix at inria.fr>wrote:
>
>> Hello,
>>
>> I would like to permute an index set with another index set, just like
>> you can do for vectors using VecScatter.
>>
>> I have two index sets IS1 and IS2 which share the same size but have
>> different parallel layouts. I often need to permute vectors/matrices using
>> those two index sets (as in first permute with IS1 then permute the result
>> with IS2). Since I don't use the intermediate result, I would like to
>> permute IS1 with IS2 to get a new index set so that I can permute directly
>> my vectors/matrices with it. Is that possible using Petsc?
>>
>
>  We do not have this particular composition in our interface. However,
> you could accomplish this using PetscSF.
>
>    Thanks,
>
>       Matt
>
>
> Thanks for the quick answer.
>
> So basically I need to have a look at the underlying mechanism of
> VecScatter and implement something similar for IS. How complex would it be
> in practice?
>

Using the PetscSF interface instead of VecScatter should not be too hard.

   Matt


>
> Rémi
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140113/cf4c08b8/attachment.html>


More information about the petsc-users mailing list