[petsc-users] Index set with zero size

Jed Brown jed at 59A2.org
Tue Nov 9 07:50:45 CST 2010


On Tue, Nov 9, 2010 at 14:41, Tim Kroeger
<tim.kroeger at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101109/97ee63b2/attachment.htm>


More information about the petsc-users mailing list