On Fri, Jan 16, 2009 at 6:58 AM, Tim Kroeger <span dir="ltr"><<a href="mailto:tim.kroeger@cevis.uni-bremen.de">tim.kroeger@cevis.uni-bremen.de</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear PETSc team,<br>
<br>
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?</blockquote>
<div><br>No, it will have the local size without ghosts. You can get the number of ghosts from the size of the local form VecGhostGetLocalForm()<br>or from the size of the LocalToGlobalMapping.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I assume that if I know this number, I can use the ISLocalToGlobalMapping*() functions to get the global indices of the ghost values.<br>
<br>
I also assume that the values supplied by VecGetOwnershipRange() do not include ghost cells (since it wouldn't be a consecutive range otherwise).</blockquote><div><br>Yes.<br><br> Matt<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Are these assumptions correct?<br>
<br>
(My conjecture is that VecGetLocalSize() does include the ghost cells<br>
while I can get the number without the ghost cells by subtracting the<br>
two numbers that VecGetOwnershipRange() supplies.)<br>
<br>
Best Regards,<br>
<br>
Tim<br><font color="#888888">
<br>
-- <br>
Dr. Tim Kroeger<br>
<a href="mailto:tim.kroeger@mevis.fraunhofer.de" target="_blank">tim.kroeger@mevis.fraunhofer.de</a> Phone +49-421-218-7710<br>
<a href="mailto:tim.kroeger@cevis.uni-bremen.de" target="_blank">tim.kroeger@cevis.uni-bremen.de</a> Fax +49-421-218-4236<br>
<br>
Fraunhofer MEVIS, Institute for Medical Image Computing<br>
Universitaetsallee 29, 28359 Bremen, Germany<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>