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

Get information on matrix

+1 vote

Hello,

I am interested into getting some information on a PETSc matrix resulting from assembly process :

A = PETScMatrix()
assemble_system(a, L, bcs, A_tensor=A, b_tensor=b)

Is it possible to use PETSc's MatGetInfo function within petsc4py syntax ? Do someone have some experience with this ?

Thank you in advance,

Claire

asked May 27, 2015 by Claire L FEniCS User (2,120 points)

1 Answer

+2 votes

Hi, MatGetInfo is not exposed in petsc4py. If you have cloned your own version of petsc4py, it is very easy to add this functionality, see here. Anyway, block_size field of the MatInfo is available as a property.

answered May 27, 2015 by MiroK FEniCS Expert (80,920 points)
...