← Back to team overview

dolfin team mailing list archive

Re: Dense matrices

 



Johan Jansson wrote:
On Fri, Mar 31, 2006 at 01:50:13PM +0200, Garth N. Wells wrote:

...

For a full 6x6 matrix which is assembled 1e7 times, the normalised
timings were

PETSc*:                   25
Boost multi_array class:  8
Boost ublas::matrix:      1.7
std::vector based matrix: 4.8
standard array:           1

Small correction:
Blitz++: 1.7
ublas:   1.95

ublas (http://www.boost.org/libs/numeric/ublas/doc/index.htm) looks
really nice and provides everything I would like to have for a dense
matrix. It's a template library, we don't have to worry about linking to
it. If we use it, we could avoid a dependency by including the header
files in DOLFIN somewhere, something like dolfin/contrib?

Garth


I evaluated ublas when we were looking at different sparse linear
algebra packages. I also liked the design of ublas, but the sparse
performance was quite poor. But if we only use the dense
representation I guess it would be a great candidate.

A dense linear algebra representation could perhaps also be used for
the affine geometry mapping, which is currently implemented without
abstractions. If there's no significant performance penalty that is.


The more I look at it, the more I like it.

For the benchmarks I made, there was no optimisation (it was missing from dolfin-config --cflags). When using optimisation, uBlas outperforms the simple functions I wrote for inserting and retrieving values from an array. It also provides a LU solver (which I need to compute inverses of small matrices).

It compiled fine with the Intel Linux compiler, and I'm testing it now under Cygwin.

Garth


  Johan

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



Follow ups

References