← Back to team overview

dolfin team mailing list archive

Re: extract matrix

 



Shawn Walker wrote:
How do I get access to the elements of the sparse matrix that is assembled by the VariationalProblem class and the routine `solve'? I need to compare the entries to a benchmark case.


You can't get the matrix from VariationalProblem. To check the matrix, write your own code to assemble the matrix (can be copied from inside VariationalProblem and may only be one or two lines), or just add some lines inside VariationalProblem.

To ease comparison, use the uBLAS linear algebra background. You can access terms elements-wise and add/subtract matrices easily.

Garth

- Shawn
_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev




Follow ups

References