Hi, I am new here. Could I ask how to read out the matrix in class Matrix? For example, in the following code, if I want to read the data in A after assembling, what should I do?
So thanks for the helps!
from dolfin import *
import numpy
# Create mesh and define function space
nx = ny = 2
mesh = UnitSquare(nx, ny)
V = FunctionSpace(mesh, 'Lagrange', 1)
dt = 0.3 # time step
# Define variational problem
u = TrialFunction(V)
v = TestFunction(V)
a = u*v*dx + dt*inner(nabla_grad(u), nabla_grad(v))*dx
A = assemble(a) # assemble