Gee, having vectors with a little extra space at the end is hard! Notation: J is the Jacobian, P is the associated preconditioning matrix
PCFieldSplit gets the full row blocks (Afield) or the off-diagonal blocks (B,C) from J. I implement these matrix-free and use VecGhost internally. It also queries P for diagonal blocks (A,D). I provide these as assembled AIJ and BAIJ matrices. It then obtains work vectors by getting vecs from A and D which returns ordinary MPI vectors (no ghosts). It then tries to multiply B and C with these vectors which fails because I need the ghosts. In my particular case, this could be fixed by getting the work vecs from B and C, but that just pushes the problem elsewhere. So it looks like I either have to abandon VecGhost (which I'd rather not do because it would add two copies to every matrix-free multiply, and these multiplies normally only touch a little more memory than a vector an thus can be pretty cheap) or I need to be able to turn an unghosted vec into a ghosted one (in-place since I have a Vec, not a Vec*). I can think of a couple ways to do this, but they would be a maintenance nightmare. There might be a way to reorganize VecCreateGhostBlockWithArray to make this possible, but it still looks messy to me. Any ideas? Jed -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 260 bytes Desc: OpenPGP digital signature URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20090527/34ad933a/attachment.pgp>