On Tue, Mar 1, 2016 at 8:56 AM, Jed Brown <[email protected]> wrote:

> Matthew Knepley <[email protected]> writes:
> >> No.  You only need to call VecAssembly if you use VecSetValues.  But if
> >>
> >
> > I thought we had state increase on getarray() as well, but its just
> locking.
>
> VecRestoreArray calls PetscObjectStateIncrease, but what does that has
> to do with VecAssembly?
>
> >> you have a ghosted vector, you would normally use VecGetArray and never
> >> bother with VecSetValues.
> >
> >
> > Why would we assume people make the ghost values as well?
>
> Huh?
>
> > However, if this is the only case, I don't think putting it in is a
> > great idea.
>

I am trying to understand what you are saying here. I have a vector on 2
procs, divided as

p0  |----interior---|--ghost--|

p1  |----interior---|--ghost--|

Now I calculate some values in the interior on both procs using
VecGetArray(),

p0  |xxxxinteriorxxx|--ghost--|

p1  |xxxxinteriorxxx|--ghost--|

What is wrong with calling VecGhostUpdate() here to fill in the ghosts? Is
your contention
that I should have also calculated the ghosts?

  Matt

-- 
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

Reply via email to