[petsc-users] DM vector restriction questions
Barry Smith
bsmith at mcs.anl.gov
Sun May 25 19:51:08 CDT 2014
And VecStrideNorm(), VecStrideScale(), VecStrideNormAll() etc. Let us know what is missing and what you need?
Barry
On May 25, 2014, at 7:40 PM, Jed Brown <jed at jedbrown.org> wrote:
> 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
More information about the petsc-users
mailing list