First, I will give my code:
mesh = UnitCubeMesh(10, 10, 10)
V = VectorFunctionSpace(mesh, 'P', 1)
u = TrialFunction(V)
v = TestFunction(V)
a = dot(u, v)*dx
stif = assemble(a)
print(type(stif))
b = Vector(mesh.mpi_comm(), 10)
print(type(b))
c = Matrix(mesh.mpi_comm(), 10, 10)
print(type(c))
I have successfully created a dolfin.cpp.la.Vector b. However, when I create a dolfin.cpp.la.Matrix c, FEniCS tells me that:
c = Matrix(mesh.mpi_comm(), 10, 10) File "/usr/lib/python2.7/dist-packages/dolfin/cpp/la.py", line 3934, in __init__
_la.Matrix_swiginit(self, _la.new_Matrix(*args)) NotImplementedError: Wrong number or type of arguments for overloaded
function 'new_Matrix'. Possible C/C++ prototypes are:
dolfin::Matrix::Matrix(MPI_Comm)
dolfin::Matrix::Matrix()
dolfin::Matrix::Matrix(dolfin::Matrix const &)
dolfin::Matrix::Matrix(dolfin::GenericMatrix const &)
Aborted (core dumped)
So my question is, how to create the Matrix c correctly.
Thank you.