← Back to team overview

dolfin team mailing list archive

Re: Dense matrices

 

On Wed, Mar 29, 2006 at 12:22:18PM +0200, Garth N. Wells wrote:
> I'd like to resurrect some functionality for dealing with small dense
> matrices (addition, multiplication, eigenvalues, inverse, etc.).
> Versions of DOLFIN prior to the transition to PETSc had some of this.

Because PETSc does not handle this efficiently?

> I'm open to suggestions as to the best data structure for this. The code
> in /src/kerenel/common/dolfin/Tensor.h could provide the underlying data
> structure, although perhaps this code needs to be readdressed. I 'm
> thinking we could
> 
> 1. Keep Tensor.h as it is.
> 
> 2. Derive Tensor.h from src/kernel/common/dolfin/Array.h, which in turn
> is based on std::vector.
> 
> 3. Make Tensor.h (and perhaps Array.h also) a wrapper for another
> library that handles multi-dimensional arrays (for this Blitz++ looks
> nice, http://www.oonumerics.org/blitz/, and there is also
> http://www.boost.org/libs/multi_array/doc/index.html). Any suggestions?
> 
> Garth

I'm not sure we should use Tensor or Array for this. They may have
similarities in data structures (you can access entries in various
positions) but I don't think they should have operations like inverse
or eigenvalues.

If we need a dense matrix and PETSc is not enough, I think the most
natural would be to create a class DenseMatrix that could wrap Blitz++
or something else.

/Anders



Follow ups

References