MatZeroRows and MatAssembly

Gong Ding gdiso at
Wed May 28 09:48:14 CDT 2008

I meet some trouble about my code.
I'd like to use MatZeroRows to perform  Dirichlet boundary condition.
However, it requires MatAssembly, which packs the sparse matrix.
Then the none zero pattern seems to be freezed. The continued MatSetValues
may be very low efficient if the item not in the previous none zero 

 Is there any way to use MatZeroRows without freeze the none zero pattern?
Or I have to redesign my code....

Gong Ding 

More information about the petsc-users mailing list