On Thu, Aug 8, 2013 at 6:32 AM, Bishesh Khanal <[email protected]> wrote:

> Hi all,
> Let's say I have two DMDAs with identical size but with different dofs.
> E.g. da1 with dof=4;   da2 with dof=1;
> I have global vectors associated with each one of them, say, gv1 and gv2
> respectively.
> How can I copy/scatter values of one particular field from gv1 to gv2 ?
> Looking at the manual it seems I should be able to use sth like following:
> VecScatterCreate(Vec gv1, IS iGv1, Vec gv2, IS iGv2, VecScatter *ctx)
> VecScatterBegin(VecScatter ctx, Vec gv1,Vec gv2,
> INSERT_VALUES,SCATTER_FORWARD);
> But I do not know how to get the Index sets iGv1 and iGv2 in this case.
>

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecStrideGather.html

   Matt

-- 
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

Reply via email to