I think it would be really useful to look at the DA code first. This has<br>
all the correct structures, but a simple implementation for structured<br>
grids. For instance, the gradient is the action of the Jacobian on a<br>
vector. That is really how it should be coded. You have a bunch of<br>
local actions, and then a global assembly.<br>
<br>
Matt<br><br><div><span class="gmail_quote">On 3/4/06, <b class="gmail_sendername"><a href="mailto:billy@dem.uminho.pt">billy@dem.uminho.pt</a></b> <<a href="mailto:billy@dem.uminho.pt">billy@dem.uminho.pt</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Hi,<br><br>I need the gradient of 5 scalars at ghost cells and I was thinking of creating
<br>5x3 vectors with VecCreateGhost(). Right now, I calculate the gradient during<br>each iteration and I don't store it's value.<br>I would like to calculate, store and exchange the gradient at the ghost cells<br>only, to minimize memory requirements. How is the best way to do that?
<br><br>Billy.<br><br></blockquote></div><br><br clear="all"><br>-- <br>"Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness