Skip to content
Discussion options

You must be logged in to vote

Courtesy of @pbrubeck on Slack:

indptr, indices, values = assemble(a).petscmat.getValuesCSR()
import scipy
A = scipy.sparse.csr_matrix((values, (indptr, indices))
mdict = {"fem_matrix": A}
scipy.io.savemat("firedrake_output", mdict)

And:

values = assemble(L).dat.data_ro

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dham
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants