[petsc-dev] checking if a vector is ghosted

Barry Smith bsmith at mcs.anl.gov
Wed Nov 9 16:50:59 CST 2011


On Nov 9, 2011, at 4:37 PM, Jed Brown wrote:

> On Tue, Nov 8, 2011 at 14:49, mspieg <mspieg at ldeo.columbia.edu> wrote:
> VecIsGhosted would be nice…
> 
> Pushed to petsc-dev. The semantics are simply whether VecGhostGetLocalForm() will succeed (which is normally what you want in the degenerate case of a serial Vec which is equal to its ghosted representation). An alternative would be to eliminate VecIsGhosted and just have VecGhostGetLocalForm function return NULL if the Vec is not ghosted. I'm half-inclined to just do that, but would like to hear comments first.

   We don't usually do things that way hence I think a specific checking function is better.

   3 seconds later I like the idea of returning null if it does not exist and not having the other checking function. Mark me down for the returning null approach.

   Barry





More information about the petsc-dev mailing list