Hi, 
 
I now get the following error 

File "compressible_stratified.py", line 137, in <module>
    print A.M.handle.getValues(1,1)
  File "PETSc/Mat.pyx", line 738, in petsc4py.PETSc.Mat.getValues (src/petsc4py.PETSc.c:121949)
  File "PETSc/petscmat.pxi", line 919, in petsc4py.PETSc.matgetvalues (src/petsc4py.PETSc.c:29292)
petsc4py.PETSc.Error: error code 56
[0] MatGetValues() line 1845 in /tmp/pip-v0eIT6-build/src/mat/interface/matrix.c
[0] No support for this operation for this object type
[0] Mat type nest





From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Justin Chang <jychang48@gmail.com>
Sent: 24 August 2016 19:18:54
To: firedrake@imperial.ac.uk
Subject: Re: [firedrake] Accessing values of a block matrix system
 
Use print A.M.handle.getValues(1,1)

On Wednesday, August 24, 2016, William Booker <scwb@leeds.ac.uk> wrote:

Dear Firedrakers,

I'm trying to compare the matrices I get from matlab to the ones generated in Firedrake, but I've run into some issues:


A = assemble(a, nest=True)

print A.getValues(1,1)

gives me 

  File "compressible_stratified.py", line 137, in <module>
    print A.getValues(1,1)
AttributeError: 'Matrix' object has no attribute 'getValues'


How would I fix this ?

Regards
Will