[petsc-users] Using ghosted vector as 'x' in KSPSolve

Jed Brown jedbrown at mcs.anl.gov
Wed Oct 12 06:43:23 CDT 2011


On Wed, Oct 12, 2011 at 06:38, Dominik Szczerba <dominik at itis.ethz.ch>wrote:

> Is it legal to call KSPSolve with the solution vector being a
> ghost-aware vector created e.g. with VecCreateGhost?
>

Yes


>
> Underlying motivation: when setting up my element stiffness matrix I
> have a term depending on previous value of x, say in a transient
> scheme. But it has to be a ghosted vector, because local size of x is
> smaller than the amount of all nodes referenced by the local cells.
> For the moment I maintain a ghost-aware copy of 'x' that I update
> manually but am thinking if there are more efficient solutions
> possible.
>

It's unlikely that this will make a performance difference in your
application. (I can design a real problem where it's measurable, but it
usually isn't.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111012/22ff73cf/attachment.htm>


More information about the petsc-users mailing list