On Tue, Nov 9, 2010 at 14:41, Tim Kroeger
<tim.kroeger@cevis.uni-bremen.de> wrote:
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
Ah, I missed that you called MatGetSubMatrix on a MatShell in which you hadn't implemented MatGetSubMatrix, therefore you had a MatSubMatrix.
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.
Jed