[petsc-users] Return value of PCFactorGetMatrix

Uwe Schlifkowitz uwe.schlifkowitz at uibk.ac.at
Tue Dec 13 12:51:24 CST 2011


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.

Uwe


More information about the petsc-users mailing list