[petsc-users] creating a global vector of one particular field from a global vector created from multiple dof dmda

Bishesh Khanal bisheshkh at gmail.com
Thu Aug 8 06:32:21 CDT 2013


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130808/cc67b0b7/attachment.html>


More information about the petsc-users mailing list