On Tue, Dec 13, 2011 at 12:51 PM, Uwe Schlifkowitz <span dir="ltr">&lt;<a href="mailto:uwe.schlifkowitz@uibk.ac.at">uwe.schlifkowitz@uibk.ac.at</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 13.12.2011, at 19:03, Hong Zhang wrote:<br>
&gt;&gt; I found MatGetInertia in petsc&#39;s documentation and i am not sure how to use it. I found an old example from petsc-2.3.1 (<a href="http://www.mcs.anl.gov/petsc/petsc-2.3.1/src/ksp/ksp/examples/tutorials/ex10.c.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-2.3.1/src/ksp/ksp/examples/tutorials/ex10.c.html</a> ), but things seem to have changed since that version. Can you give an example?<br>

&gt;<br>
&gt; petsc-3.2/src/ksp/ksp/examples/tests/ex33.c and ex36.c<br>
&gt;<br>
&gt; Hong<br>
<br>
Thank you. I already looked into ex33. My input matrix however is not in sbaij format:<br>
<br>
[0]PETSC ERROR: --------------------- Error Message ------------------------------------<br>
[0]PETSC ERROR: No support for this operation for this object type!<br>
[0]PETSC ERROR: Mat type seqaij!<br>
<br>
How do i convert the matrix to sbaij? I tried MatConvert as in ex36.c, but after that the matrix is not symmetric anymore.</blockquote><div><br></div><div>It is time to read the manual. If you convert to SBAIJ, your matrix is symmetric by definition.</div>
<div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
Uwe</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>