On Wed, May 27, 2009 at 2:50 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
On May 27, 2009, at 2:23 PM, Jed Brown wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Gee, having vectors with a little extra space at the end is hard!<br>
<br>
Notation: J is the Jacobian, P is the associated preconditioning matrix<br>
<br>
PCFieldSplit gets the full row blocks (Afield) or the off-diagonal<br>
blocks (B,C) from J. I implement these matrix-free and use VecGhost<br>
internally. It also queries P for diagonal blocks (A,D). I provide<br>
these as assembled AIJ and BAIJ matrices. It then obtains work vectors<br>
by getting vecs from A and D which returns ordinary MPI vectors (no<br>
ghosts).<br>
</blockquote>
<br></div>
You could provide the getvecs() method for the A and D matrices that you<br>
provide to give you the ghosted vectors that you need?<font color="#888888"></font></blockquote><div><br>I agree with Barry. If you want to use ghosts, make everything use VecGhost.<br><br> Matt<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888"><br>
Barry</font><div><div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It then tries to multiply B and C with these vectors which<br>
fails because I need the ghosts. In my particular case, this could be<br>
fixed by getting the work vecs from B and C, but that just pushes the<br>
problem elsewhere.<br>
<br>
So it looks like I either have to abandon VecGhost (which I'd rather not<br>
do because it would add two copies to every matrix-free multiply, and<br>
these multiplies normally only touch a little more memory than a vector<br>
an thus can be pretty cheap) or I need to be able to turn an unghosted<br>
vec into a ghosted one (in-place since I have a Vec, not a Vec*). I can<br>
think of a couple ways to do this, but they would be a maintenance<br>
nightmare. There might be a way to reorganize<br>
VecCreateGhostBlockWithArray to make this possible, but it still looks<br>
messy to me. Any ideas?<br>
<br>
<br>
Jed<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>