[petsc-users] Extracting a particular DOF from DMDA vector

amlan barua abarua at iit.edu
Wed Jan 29 23:25:30 CST 2014


Thanks. Let me state my problem more clearly.
I have a DMDAVector with n DOFs. My application demands  the scattering of
individual components into vectors so that I can perform Mat-Vec
multiplication on individual DOFs. How do I make sure that  the vector to
which I want to scatter has same parallel layout as the original DMDAVector
with n dofs?
Can I create two DMDAVectors, one from a DMDA with n dofs and other from
DMDA with 1 dof and everything same otherwise?
Amlan


On Mon, Jan 27, 2014 at 7:30 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Mon, Jan 27, 2014 at 1:38 AM, amlan barua <abarua at iit.edu> wrote:
>
>> Hi,
>> What is the best way of extracting all values corresponding to a
>> particular degree of freedom of a DMDA vector?
>>
>
> It depends what you want to do with it. YOu can use DMDAVecGetArrayDOF()
> or VecScatterStride().
>
>    Matt
>
>
>>
>> Amlan
>>
>
>
>
> --
> 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/20140130/f74716fe/attachment.html>


More information about the petsc-users mailing list