PCApply_Shell & ghosts...
Barry Smith
bsmith at mcs.anl.gov
Wed Aug 13 15:49:11 CDT 2008
On Aug 13, 2008, at 3:41 PM, Eric Chamberland wrote:
> Hi,
>
> we are using PETSc in our code and we have a problem with, I think,
> the ghosted values that we expect.
>
> We developed our own pre-conditioner, and try to use it in a
> parallel environment. With other precondtioners (PETSc built-in),
> everything works fine. But with our home-made one, here is the
> problem that we have:
>
> When PCApply_Shell give use the vectors, there are no "ghost" values
> in them... In our code, we expect to always have these values...
>
> Not having the ghosts in the vectors passed by PCApply_shell, is
> that a normal behavior?
Yes. The solver code has no idea of what are ghost points, what
communication is needed for ghosts etc.
If you are using Vecs from VecCreateGhost() then you only need to
call VecGhostUpdateBegin() VecGhostUpdateEnd() on
the input vector. Depending on how your preconditioner works you may
need to use the VecGhostUpdate... on the output
vector at the end of your apply.
If you are not using Vecs from VecCreateGhost() then you need to
use whatever mechanism you use to update ghost
points (for example VecScatter or DAGlobalToLocal... if you are using
those) or whatever MPI code you use.
Barry
>
>
> Thanks for the attention,
>
> Eric
>
More information about the petsc-dev
mailing list