I'm writing a petsc code using a sequential matrix type. Since I want it to be easy to parallelize, I put some stuff in the code that is useless now, but will make it easier to parallelize later.
One of the things I added was MatGetOwnershipRange()
to define the range of iterators that I'm using to build a matrix. The matrix is of type MatSeqAIJ, and has not had any values assigned to it, though memory has been allocated with MatSeqAIJSetPreallocation()
.
When I run MatGetOwnershipRange()
, though, the two PetscInts I get for the beginning and end of the range are both 0.
Does MatGetOwnershipRange()
only work for MPI matrices?
Does it only work for matrices that have had their values assigned with MatSetValues()
?