This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Inverse of a PETSc matrix

+1 vote

Maybe this is a silly question, but I can't find a method to invert a PETSc matrix. I know this is quite expensive to do, and in the 99% of the time can be avoided.

If someone can help me I would really appreciate it.

Thanks in advice.

asked Apr 10, 2016 by felipe_galarce FEniCS User (1,190 points)

1 Answer

+1 vote

http://www.mcs.anl.gov/petsc/documentation/faq.html#invertmatrix

You can get the PETSc Mat object by using the .mat() method in DOLFIN. You may need petsc4py if working in python.

answered Apr 10, 2016 by chris_richardson FEniCS Expert (31,740 points)
...