Boost logo

Glas :

Re: [glas] Block matrices

From: Wolfgang Bangerth (bangerth_at_[hidden])
Date: 2005-10-20 17:33:14


> I dont know if "nested matrices" is a clever way or not but this is the
> way we designed our LA library applied to deterministic transport codes.
>
> http://parasol.tamu.edu/asci/labfest-may05/lp-Generic_Programming_Experiments.pdf
>
> Anyway, our point is that we have to deal with complex matrix
> structures. Symbolically, we have deal with objects like
>
> DenseMatrix< DiagonalMatrix< UpperTriangularMatrix < double > > > >
>
> In this respect the block view seemed a bit restrictive.

What I meant to say is that if you do something like this, there is no way
to access the element with _global_ coordinates (i,j), because the outer
diagonal matrix can't just pass it through to its components (it doesn't
know their sizes, for example). In effect, at least for element access,
your outer matrix is more like an array than a matrix, and to write into
the matrix requires you to step through its building blocks until you got
to the innermost one.

That being said, I can completely see the need for what you do (and we
have exactly the same things in our radiative transfer code -- what a
coincidence). I guess everything depends on whether you want the object to
look more like a matrix or an array. I prefer the former view rather than
the later, but that's fine because I can always get it by building the
outer classes myself and using only numbers as template arguments for the
proposed GLAS classes.

Best
   Wolfgang

-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth_at_[hidden]
                                  www: http://www.math.tamu.edu/~bangerth/