Matthew Knepley <[email protected]> writes:

> Okay, this shows that we always need to specify exactly which vector,
> local or global, we are talking about (and also why I don't use
> VecGhost).

Yes, it can be confusing and it wastes storage if you have many global
Vecs (e.g., large Krylov space).

> I was confusing the VecGhostUpdate() above which puts local values in the
> global vector
> with the update which would refresh the local portion. The former update
> should be called
> automatically during assembly, which already happens in the
> FormFunctionLocals, 

Uh, no, and they don't use VecGhost...

> and would make sense to have in VecAssembly() for VecGhost I think.

No.  VecAssembly goes with VecSetValues, which has *nothing* to do with
VecGhost.  If you don't want to use VecSetValues/VecAssembly, then you
can use VecGhost and VecGetArray on the local form, followed by
VecGhostUpdate(x,ADD_VALUES,SCATTER_REVERSE).  You use one or the other;
I don't have any compelling use case for using both and it definitely
wouldn't be typical.

Attachment: signature.asc
Description: PGP signature

Reply via email to