[petsc-users] Index set with zero size

Tim Kroeger tim.kroeger at cevis.uni-bremen.de
Tue Nov 9 05:49:12 CST 2010

On Tue, 9 Nov 2010, Jed Brown wrote:

> On Tue, Nov 9, 2010 at 12:11, Tim Kroeger <tim.kroeger at cevis.uni-bremen.de> wrote:
>       Is it allowed to work with an index set (IS) with size 0?
> Yes.

Good to hear, thank you.

>       In particular, using such an index set in VecScatter and MatGetSubMatrix, I am creating the following
>       objects:
>       v : a vector of size n>0,
>       w : a vector of size 0,
>       A : a matrix of size n\times0.
>       Then I do
>       MatMultAdd (A, w, v, v);
>       This actually seems to change the value of v, although I supposed it not to do so.
> It sounds like you have a simple test case for this, could you send it?

Well, as you know, I'm using PETSc only via libMesh.  Creating a 
standalone PETSc test case is non-trivial for me.  But I'll keep to 
this and will either find out that I did something wrong or produce a 
test case for you.

It might be imporant to know that the original matrix is a 

Best Regards,


Dr. Tim Kroeger
CeVis -- Center of Complex Systems and Visualization
University of Bremen              tim.kroeger at cevis.uni-bremen.de
Universitaetsallee 29             tim.kroeger at mevis.fraunhofer.de
D-28359 Bremen                             Phone +49-421-218-7710
Germany                                    Fax   +49-421-218-4236

More information about the petsc-users mailing list