[petsc-users] Getting 0 for both start and end with MatGetOwnershipRange()

Daniel Christian Weflen Daniel.Weflen at Colorado.EDU
Wed May 9 18:01:34 CDT 2012

I have the following code:

     Mat H;
     PetscInt mat_size=x_npts*y_npts;
     PetscInt* nonzeros;
     PetscInt start_row,end_row,row_index;

When I check the values of start_row and end_row right after calling 
MatGetOwnershipRange, both are 0. What am I doing wrong here? Am I 
calling MatCreate(), MatSetSizes() and MatSetType() in the wrong order?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120509/3da7a7ae/attachment.htm>

More information about the petsc-users mailing list