dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #19907
Re: [Question #129481]: Writing matrices in Python
Question #129481 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/129481
Status: Answered => Solved
Andy R Terrel confirmed that the question is solved:
Thank Johan!
Just for reference the code became:
A = Matrix()
b = Vector()
assemble_system(a, L, bcs=bcs, A_tensor=A, b_tensor=b)
row_ptr, col_ind, val = A.data()
Acsr = csr_matrix((val, col_ind, row_ptr))
Acsr.eliminate_zeros()
mmio.mmwrite("A.mtx", Acsr )
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.
References