[petsc-users] MatZeroRows

Jed Brown jed at 59A2.org
Tue Oct 5 12:55:01 CDT 2010


On Tue, Oct 5, 2010 at 19:46, Tabrez Ali <stali at geology.wisc.edu> wrote:

> Does MatZeroRows work with SeqSBAIJ matrices?
>
> I seem to be getting the following error:
>
> [0]PETSC ERROR: No support for this operation for this object type!
> [0]PETSC ERROR: Mat type seqsbaij!
>

The message is correct, it's not supported.  In fact, that logical operation
cannot be supported by a symmetric format because it is a non-symmetric
modification.  A "zero rows and colums" could be implemented for SBAIJ, but
zeroing columns is not efficient for non-symmetric formats so you would be
committing to a specific format.

If you want the symmetric zero-rows-and-columns, I recommend doing it at the
assembly level.  You can map the "zeroed" indices to a negative number
before MatSetValues, or you can set a LocalToGlobalMapping that does this
automatically when you use MatSetValuesLocal.  Both of these solutions will
perform well with any matrix format.

Jed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101005/82865a8d/attachment.htm>


More information about the petsc-users mailing list