On Tue, Dec 13, 2011 at 12:51 PM, Uwe Schlifkowitz < uwe.schlifkowitz at uibk.ac.at> wrote:
> On 13.12.2011, at 19:03, Hong Zhang wrote: > >> I found MatGetInertia in petsc's documentation and i am not sure how to > use it. I found an old example from petsc-2.3.1 ( > http://www.mcs.anl.gov/petsc/petsc-2.3.1/src/ksp/ksp/examples/tutorials/ex10.c.html), > but things seem to have changed since that version. Can you give an > example? > > > > petsc-3.2/src/ksp/ksp/examples/tests/ex33.c and ex36.c > > > > Hong > > Thank you. I already looked into ex33. My input matrix however is not in > sbaij format: > > [0]PETSC ERROR: --------------------- Error Message > ------------------------------------ > [0]PETSC ERROR: No support for this operation for this object type! > [0]PETSC ERROR: Mat type seqaij! > > How do i convert the matrix to sbaij? I tried MatConvert as in ex36.c, but > after that the matrix is not symmetric anymore. It is time to read the manual. If you convert to SBAIJ, your matrix is symmetric by definition. Matt > > Uwe -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111213/258af27f/attachment.htm>
