BlockCompressedSetSparsityPattern Class Reference
[Sparsity patterns]

Inheritance diagram for BlockCompressedSetSparsityPattern:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 BlockCompressedSetSparsityPattern ()
 BlockCompressedSetSparsityPattern (const unsigned int n_rows, const unsigned int n_columns)
 BlockCompressedSetSparsityPattern (const std::vector< unsigned int > &row_block_sizes, const std::vector< unsigned int > &col_block_sizes)
void reinit (const std::vector< unsigned int > &row_block_sizes, const std::vector< unsigned int > &col_block_sizes)


Detailed Description

This class extends the base class to implement an array of compressed sparsity patterns that can be used to initialize objects of type BlockSparsityPattern. It is used in the same way as the BlockCompressedSparsityPattern except that it builds upon the CompressedSetSparsityPattern instead of the CompressedSparsityPattern. See the documentation of the BlockCompressedSparsityPattern for examples.

This class is an example of the "dynamic" type of Sparsity patterns.

Note: This class inherits the same tradeoffs regarding its efficiency as CompressedSparsityPattern and as opposed to CompressedSetSparsity. Since the two classes (and consequently BlockCompressedSparsityPattern and BlockCompressedSetSparsityPattern) are interface-compatible it is frequently worth checking which version is more efficient.

This class is used in step-22.

Author:
Wolfgang Bangerth, 2007

Constructor & Destructor Documentation

BlockCompressedSetSparsityPattern::BlockCompressedSetSparsityPattern (  ) 

Initialize the matrix empty, that is with no memory allocated. This is useful if you want such objects as member variables in other classes. You can make the structure usable by calling the reinit() function.

BlockCompressedSetSparsityPattern::BlockCompressedSetSparsityPattern ( const unsigned int  n_rows,
const unsigned int  n_columns 
)

Initialize the matrix with the given number of block rows and columns. The blocks themselves are still empty, and you have to call collect_sizes() after you assign them sizes.

BlockCompressedSetSparsityPattern::BlockCompressedSetSparsityPattern ( const std::vector< unsigned int > &  row_block_sizes,
const std::vector< unsigned int > &  col_block_sizes 
)

Initialize the pattern with two BlockIndices for the block structures of matrix rows and columns. This function is equivalent to calling the previous constructor with the length of the two index vector and then entering the index values.


Member Function Documentation

void BlockCompressedSetSparsityPattern::reinit ( const std::vector< unsigned int > &  row_block_sizes,
const std::vector< unsigned int > &  col_block_sizes 
)

Resize the matrix to a tensor product of matrices with dimensions defined by the arguments.

The matrix will have as many block rows and columns as there are entries in the two arguments. The block at position (i,j) will have the dimensions row_block_sizes[i] times col_block_sizes[j].


The documentation for this class was generated from the following file:

deal.II documentation generated on Wed Aug 27 19:11:07 2008 by doxygen 1.5.6