Franck, PETSc takes care of doing the matrix-vector multiplication properly using MatIS. As Matt said, the layout of the vectors is the usual parallel layout. The local sizes of the MatIS matrix (i.e. the local size of the left and right vectors used in MatMult) are not the sizes of the local subdomain matrices in MatIS.
> On May 21, 2017, at 6:47 PM, Matthew Knepley <[email protected]> wrote: > > On Sun, May 21, 2017 at 11:26 AM, Franck Houssen <[email protected] > <mailto:[email protected]>> wrote: > Using PETSc MatIS, how to matmult a global IS matrix and a global vector ? > Example is attached : I don't get what I expect that is a vector such that > proc0 = [1, 2] and proc1 = [2, 1] > > 1) I think the global size of your matrix is wrong. You seem to want 3, not 4 > > 2) Global vectors have a non-overlapping row partition. You might be thinking > of local vectors > > Thanks, > > Matt > > Franck > > > > -- > What most experimenters take for granted before they begin their experiments > is infinitely more interesting than any results to which their experiments > lead. > -- Norbert Wiener > > http://www.caam.rice.edu/~mk51/ <http://www.caam.rice.edu/~mk51/>
