[petsc-users] question about DMDA vector

Jed Brown jedbrown at mcs.anl.gov
Sat Dec 3 17:02:59 CST 2011


On Sat, Dec 3, 2011 at 17:00, Hailong Xiao <xiaohl1986 at gmail.com> wrote:

> PetscScalar **f,**u;
> ...
> DMDAVecGetArray(DM da,Vec local,(void*)&u);
> DMDAVecGetArray(DM da,Vec global,(void*)&f);
> ...
> f[i][j] = u[i][j] - ...
>
>
> does it change the values in vector "global" after I change the values in
> "f"?
>

This sets the values in global, but you can only address "owned" parts of
the global vector.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111203/3ead47fe/attachment.htm>


More information about the petsc-users mailing list