VecGetLocalSize()

Matthew Knepley knepley at gmail.com
Fri Jan 16 09:09:44 CST 2009


On Fri, Jan 16, 2009 at 6:58 AM, Tim Kroeger <
tim.kroeger at cevis.uni-bremen.de> wrote:

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


No, it will have the local size without ghosts. You can get the number of
ghosts from the size of the local form VecGhostGetLocalForm()
or from the size of the LocalToGlobalMapping.


>
> 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 otherwise).


Yes.

   Matt


>
> 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,
>
> Tim
>
> --
> Dr. Tim Kroeger
> tim.kroeger at mevis.fraunhofer.de            Phone +49-421-218-7710
> tim.kroeger at cevis.uni-bremen.de            Fax   +49-421-218-4236
>
> Fraunhofer MEVIS, Institute for Medical Image Computing
> Universitaetsallee 29, 28359 Bremen, Germany
>
>


-- 
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-users/attachments/20090116/ba459550/attachment.htm>


More information about the petsc-users mailing list