VecGhost and state

Matthew Knepley knepley at gmail.com
Thu Apr 30 07:21:31 CDT 2009


On Thu, Apr 30, 2009 at 7:14 AM, Jed Brown <jed at 59a2.org> wrote:

> Matthew Knepley wrote:
> > We should just treat LocalForm as GetArray, and increase the state on
> > RestoreLocalForm.
>
> I thought of this, but like the maximum better.  With GetArray, you
> don't have a nice way to determine whether the user changed anything, so
> the cache needs to be invalidated by default.  When the user does not
> modify the array, the state is needlessly increased, hence the goofing
> with state in VecEqual.


We could make a copy and do the same thing for GetArray. We don't because
it is more expensive. The same argument applies here. Some people will
complain about any unnecessary expense.


> Increasing the state will work fine of course, but I think using the
> maximum is equally safe while making better use of cacheing.  Also, if
> the global form has changed, I think we want the local form's state to
> increase in GetLocalForm.


The local form is meaningless after restore so its state is unimportant.

  Matt


>
> Jed
>
-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20090430/dac3dc7a/attachment.html>


More information about the petsc-dev mailing list