[petsc-users] Vector with ghost values using DMDA

Hong hzhang at mcs.anl.gov
Wed Oct 5 09:22:30 CDT 2016


Praveen :
DMGetLocalVector().
See petsc/src/snes/examples/tutorials/ex19.c

Hong

> So I have to create a global vector AND a local vector using
> DMCreateLocalVector.
>
> Then I do DMGlobalToLocalBegin/End. Does this not lead to too much copying
> ? I see there is VecCreateGhost but no such thing for DMDA ?
>
> Best
> praveen
>
> PS: Would be nice if the reply-to was set to mailing list. I frequently
> forget to do Reply All.
>
> On Wed, Oct 5, 2016 at 7:45 PM, Jed Brown <jed at jedbrown.org> wrote:
>
>> Praveen C <cpraveen at gmail.com> writes:
>>
>> > Dear all
>> >
>> > I am using DMDA and create a vector with
>> >
>> > DMCreateGlobalVector
>> >
>> >
>> > However this does not have ghost values. How should I create vector if I
>> > want to access ghost values ?
>>
>> That's what local vectors are for.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20161005/83d79640/attachment.html>


More information about the petsc-users mailing list