[petsc-users] DM vector restriction questions

Jed Brown jed at jedbrown.org
Sun May 25 19:40:48 CDT 2014


Xiangdong <epscodes at gmail.com> writes:

> Hello everyone,
>
> I have a questions about vectors in an DMDA with DOF>1. For example, in 1d
> with number of grid N and DOF=2 (two fields u and v), the length of the
> global vector is 2*N.
>
> What is the best way to restrict this vector (length 2*N) to a vector
> (length N) corresponding to the field u only?  This will help me obtain the
> properties of field u by using VecSum and other vec functions.

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecStrideGather.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140525/d7b67000/attachment.pgp>


More information about the petsc-users mailing list