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.
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.
.mat()