> I have A, B and C already assembled as SparseMatrix<double>, and I am
> thinking of using the BlockMatrix class, that is, to have M as a
> BlockMatrix with 4 blocks (organized as a 2x2 grid). Trouble is, I cannot
> seem to find the transpose operation for a SparseMatrix to create the
> "A^T" block... my guess that can be avoided somehow but I cannot see how
> to do that in the context of the BlockMatrix classes.

If the *sparsity pattern* of A is symmetric, then you could just create a 
second matrix (say, AT) with the same sparsity pattern and fill it by using an 
iterator over the matrix elements of A and writing their value into the 
transpose element of AT.

 
> If I were to use an iterative solver (GMRES) instead of UMFPACK, could I
> have "M" to be some generic matrix type (derived from
> SparseMatrix<double>) for which I override the vmult operation to do what
> I want? Or is this not a good approach?

You can definitely do that. An alternative is to use the BlockMatrixArray 
class together with the TransposeMatrix class.

Best
 W.

-------------------------------------------------------------------------
Wolfgang Bangerth                email:            [email protected]
                                 www: http://www.math.tamu.edu/~bangerth/
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to