MatGetLocalSize() and MatDenseGetLocalMatrix()

Matthew Knepley knepley at
Tue Jan 6 13:33:54 CST 2009

On Tue, Jan 6, 2009 at 11:52 AM, Yujie <recrusader at> wrote:

> Dear PETSc developers:
> I am trying to use MatGetArray() and MatSetValues() to combine several
> MPIDense matrices into one matrix. At the beginning, I use
> MatGetOwnershipRange() and Mat->camp.rstart; Mat->cmap.rend (2.3.3-p8
> version) to get the start, end row and column. I can calculate the local
> rows and columns.
> I also use MatGetLocalSize() to confirm the accuracy. However, I always
> find some data loses in the combined matrix.
> And then, I try to use MatDenseGetLocalMatrix() to get the lcoal matrix and
> output it. I find column information by MatGetLocalSize() is not consistent
> with by MatDenseGetLocalMatrix(), is it bug? could you give me some advice?
> thanks a lot.
What information?


> Regards,
> Yujie
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the petsc-users mailing list