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

Dominik Szczerba dominik at itis.ethz.ch
Wed Oct 12 06:38:04 CDT 2011

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

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


More information about the petsc-users mailing list