> I've written a couple of additions for consideration for the Trilinos
> BlockSparseMatrix class. Please find attached the patch, and within the zip
> files a test program.
Nice, thanks!
Can I ask you to make a couple of changes?
1/ The row/col_index_within_bounds() functions are actually equivalent to the
condition
i < this->m()
or
j < this->n()
Rather than duplicating this functionality, please use the conditions above
and remove the new functions.
2/ You also don't really need the local_block_indices() function. To get the
block_index/index_within_block pair, for example for a row index 'i', you can call
this->row_block_indices.global_to_local(i).
3/ If write_ascii is not yet implemented, leave it out for now.
4/ Looking at the add functions you introduce, there are really only two that
you currently implement:
- The one that adds a single value to position (i,j). But this one already
exists in the base class, see block_matrix_base.h around line 2025-2050.
What does your function do that you don't?
- The one that adds a whole block matrix. Could you try to just put this
function into the BlockMatrixBase class where the argument is then of
type BlockMatrixBase<MatrixType> instead of BlockSparseMatrix. This
functionality would seem generic for all possible matrix types.
If it's true that you don't need the first function and that the second can be
put into the base class then you don't need any of the overloads of add() in
the TrilinosWrappers::BlockSparseMatrix class.
As I said, many thanks for posting the patch. I'm sure we can get this in
before the release!
Cheers
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@math.tamu.edu
www:
http://www.math.tamu.edu/~bangerth/