So, I do not need to call the VecAssemblyBegin; and VecAssemblyEnd; routines in order to set the values of f?<br><br><div class="gmail_quote">On Sat, Dec 3, 2011 at 5:02 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><div class="gmail_quote">On Sat, Dec 3, 2011 at 17:00, Hailong Xiao <span dir="ltr"><<a href="mailto:xiaohl1986@gmail.com" target="_blank">xiaohl1986@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>PetscScalar **f,**u;<br>...<br>DMDAVecGetArray(DM da,Vec local,(void*)&u);<br>DMDAVecGetArray(DM da,Vec global,(void*)&f);<br>
...<br>f[i][j] = u[i][j] - ...<br><br><br clear="all">does it change the values in vector "global" after I change the values in "f"?</div></blockquote></div><br></div><div>This sets the values in global, but you can only address "owned" parts of the global vector.</div>
</blockquote></div><br><br clear="all"><br>-- <br>Hailong<br>