<div class="gmail_quote">On Tue, Nov 9, 2010 at 14:41, Tim Kroeger <span dir="ltr"><<a href="mailto:tim.kroeger@cevis.uni-bremen.de">tim.kroeger@cevis.uni-bremen.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I had a look into src/mat/impls/submat/submat.c (of petsc-3.1-p4) and found that MatMultAdd_SubMatrix() internally calls MatMult() (line 155), not MatMultAdd(). Later in that method, some VecAYPX() is called (line 159), which might do the required addition. Can you please confirm whether</blockquote>
</div><br><div>Ah, I missed that you called MatGetSubMatrix on a MatShell in which you hadn't implemented MatGetSubMatrix, therefore you had a MatSubMatrix.</div><div><br></div><div>Looking at MatMultAdd_SubMatrix, I see that the code is wrong if v2==v3. We don't have "weighted scatters", so I think it needs to get another work vector for a correct answer with "left scaling" and v2==v3. I'll fix this in 3.1 and -dev, but I might not get to it today.</div>
<div><br></div><div>Jed</div>