[petsc-users] Accessing Vector's ghost values
Bojan Niceno
bojan.niceno at psi.ch
Thu Feb 23 12:07:44 CST 2012
Thanks Ju. I studied this case carefully, and it seems clear to me.
When I apply the same techniques in my code, I get error messages I sent
to my reply to Matthew.
Cheers,
Bojan
On 2/23/2012 6:46 PM, Ju LIU wrote:
>
>
> 2012/2/23 Bojan Niceno <bojan.niceno at psi.ch <mailto:bojan.niceno at psi.ch>>
>
> Hi all,
>
> I've never used a mailing list before, so I hope this message will
> reach PETSc users and experts and someone might be willing to help
> me. I am also novice in PETSc.
>
> I have developed an unstructured finite volume solver on top of
> PETSc libraries. In sequential, it works like a charm. For the
> parallel version, I do domain decomposition externally with Metis,
> and work out local and global numberings, as well as communication
> patterns between processor. (The latter don't seem to be needed
> for PETSc, though.) When I run my program in parallel, it also
> works, but I miss values in vectors' ghost points.
>
> I create vectors with command: VecCreate(PETSC_COMM_WORLD, &x);
>
> Is it possible to get the ghost values if a vector is created like
> this?
>
> I have tried to use VecCreateGhost, but for some reason which is
> beyond my comprehension, PETSc goes berserk when it reaches the
> command: VecCreateGhost(PETSC_COMM_WORLD, n, PETSC_DECIDE, nghost,
> ifrom, &x)
>
> Can anyone help me? Either how to reach ghost values for vector
> created by VecCreate, or how to use VecCreateGhost properly?
>
> http://www.mcs.anl.gov/petsc/petsc-current/src/vec/vec/examples/tutorials/ex9.c.html
> could be helpful.
>
>
> Bojan
>
>
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120223/fb886ebe/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Signature.png
Type: image/png
Size: 6515 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120223/fb886ebe/attachment-0001.png>
More information about the petsc-users
mailing list