So, I do not need to call the VecAssemblyBegin; and VecAssemblyEnd; routines in order to set the values of f?
On Sat, Dec 3, 2011 at 5:02 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote: > 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. > -- Hailong -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111203/980a9e90/attachment-0001.htm>
