<div class="gmail_quote">On Tue, Oct 5, 2010 at 19:46, Tabrez Ali <span dir="ltr"><<a href="mailto:stali@geology.wisc.edu">stali@geology.wisc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":2dv">Does MatZeroRows work with SeqSBAIJ matrices?<br>
<br>
I seem to be getting the following error:<br>
<br>
[0]PETSC ERROR: No support for this operation for this object type!<br>
[0]PETSC ERROR: Mat type seqsbaij!</div></blockquote></div><br><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>Jed</div>