[petsc-dev] Vector operations on ghosted vectors

Matthew Knepley knepley at gmail.com
Fri Mar 1 09:28:16 CST 2013

On Fri, Mar 1, 2013 at 10:24 AM, John Mousel <elafint.john at gmail.com> wrote:

> I use the data in the vectors for things besides pure vector operations.
> In the context of a sub-iteration scheme for an incompressible solver, I
> want to use the values stored in the vector at the previous iteration to
> construction the non-linear term. This requires copying not just the local
> portion of the vector in the u(k)->u(k-1) operation, but the ghosts as
> well. Doesn't copying the entire ghosted vector make sense in this context?

It seems like a strange work flow. Since none of the vector operations
touch these, you will be getting
stale values anyway. It would make more sense to me if you were using
GlobalToLocal() during the iteration.


> John
> On Fri, Mar 1, 2013 at 8:09 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>> On Wed, Feb 27, 2013 at 4:56 PM, John Mousel <john.mousel at gmail.com>wrote:
>>> Is there a possibility of adding a wrapper function around a few basic
>>> vector operations such as VecCopy, VecAXPY, VECAXPYPZ... to operate on
>>> ghosted vectors? I perform a lot of vector operations including the ghost
>>> region to avoid communication.
>> Can you explain the context where operating with local forms in this way
>> makes sense? Usually you would either be working locally, in which case you
>> copy between local forms (or purely local work vectors) or you are
>> operating globally in which case there is nothing to gain by applying
>> operations to the local form.

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/20130301/a175bc4d/attachment.html>

More information about the petsc-dev mailing list