← Back to team overview

dolfin team mailing list archive

Re: Dense matrices

 

On Wed, 2006-03-29 at 15:12 -0600, Anders Logg wrote:
> 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.
> 

I was thinking more along the lines that Tensor would handle the
algebra, and DenseMatrix would be derived from it, with the
matrix-specific functions added in DenseMatrix.  Also, the current
Tensor template is really a multi-dimensional array. I think another
name like MultiDimensionalArray would be more appropriate once
tensor-valued functions are available.

Garth 

> 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
> 
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev




Follow ups

References