← Back to team overview

dolfin team mailing list archive

Re: extract matrix

 

Thanks.  I already got something working though.

- Shawn

On Tue, 23 Jun 2009, Garth N. Wells wrote:



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





References