[petsc-users] interchange between two different DMDAs

Dave May dave.mayhem23 at gmail.com
Wed Feb 13 10:38:54 CST 2019


On Wed, 13 Feb 2019 at 12:56, Matthew Knepley via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> On Wed, Feb 13, 2019 at 7:25 AM Kun Jiao via petsc-users <
> petsc-users at mcs.anl.gov> wrote:
>
>> Hi,
>>
>>
>>
>> I have a problem that need to interchange between two different DMDAs.
>> They have the exactly same size, however they are distributed/partitioned
>> differently across multiple processes. For instance, one DMDA is created
>> with DMDACreated1d, the other is created with DMDACreated3d. How can I
>> interchange between different DMDAs with VecScatter, or something else?
>>
>
> Yes, you would need to use VecScatter. Getting this right sounds
> nontrivial. What are you using it for?
>

Kun - we actually do something similar to what you want internal to
PCTELESCOPE when repartitioning the DMDAs.
See here

https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/pc/impls/telescope/telescope_dmda.c.html

The big difference in PCTELESCOPE is that we building scatters between 2
DMDAs with the same spatial dimension, and different parallel partitions.
That said, I don't think moving data between a 1D and 3D DMDA would
complicate things greatly, but you won't find any examples within
PCTELESCOPE.

Thanks.
Dave



>
>   Thanks,
>
>      Matt
>
>
>>
>>
>> Regards,
>>
>> Kun
>>
>> Schlumberger-Private
>>
>
>
> --
> 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
>
> https://www.cse.buffalo.edu/~knepley/
> <http://www.cse.buffalo.edu/~knepley/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190213/b2203262/attachment.html>


More information about the petsc-users mailing list