Tim Kroeger tim.kroeger at
Fri Jan 16 06:58:39 CST 2009

Dear PETSc team,

If I create a vector using VecCreateGhost() and then query the local 
size using VerGetLocalSize(), will the resulting number then include 
the number of ghost values or not?  In either case, how can I ask a 
vector about the number of ghost values that are stored locally?

I assume that if I know this number, I can use the 
ISLocalToGlobalMapping*() functions to get the global indices of the 
ghost values.

I also assume that the values supplied by VecGetOwnershipRange() do 
not include ghost cells (since it wouldn't be a consecutive range 

Are these assumptions correct?

(My conjecture is that VecGetLocalSize() does include the ghost cells
while I can get the number without the ghost cells by subtracting the
two numbers that VecGetOwnershipRange() supplies.)

Best Regards,


Dr. Tim Kroeger
tim.kroeger at            Phone +49-421-218-7710
tim.kroeger at            Fax   +49-421-218-4236

Fraunhofer MEVIS, Institute for Medical Image Computing
Universitaetsallee 29, 28359 Bremen, Germany

More information about the petsc-users mailing list