My interpretation of the documentation page of MatZeroRows is that if I've set MAT_KEEP_NONZERO_PATTERN to true, then my sparsity pattern shouldn't be changed by a call to it, e.g. a->imax should not change. However, at least for sequential matrices, MatAssemblyEnd is called with MAT_FINAL_ASSEMBLY at the end of MatZeroRows_SeqAIJ and that does indeed change my sparsity pattern. Is my interpretation of the documentation page wrong?
Alex