Public Member Functions | |
BlockSparsityPattern () | |
BlockSparsityPattern (const unsigned int n_rows, const unsigned int n_columns) | |
void | reinit (const unsigned int n_block_rows, const unsigned int n_block_columns) |
void | reinit (const BlockIndices &row_indices, const BlockIndices &col_indices, const std::vector< std::vector< unsigned int > > &row_lengths) |
bool | is_compressed () const |
unsigned int | memory_consumption () const |
void | copy_from (const BlockCompressedSparsityPattern &csp) |
void | copy_from (const BlockCompressedSetSparsityPattern &csp) |
void | copy_from (const BlockCompressedSimpleSparsityPattern &csp) |
This class extends the base class to implement an array of sparsity patterns that can be used by block sparse matrix objects. It only adds a few additional member functions, but the main interface stems from the base class, see there for more information.
This class is an example of the "static" type of Sparsity patterns.
BlockSparsityPattern::BlockSparsityPattern | ( | ) |
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.
BlockSparsityPattern::BlockSparsityPattern | ( | 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.
void BlockSparsityPattern::reinit | ( | const unsigned int | n_block_rows, | |
const unsigned int | n_block_columns | |||
) | [inline] |
Forwarding to BlockSparsityPatternBase::reinit().
Reimplemented from BlockSparsityPatternBase< SparsityPattern >.
void BlockSparsityPattern::reinit | ( | const BlockIndices & | row_indices, | |
const BlockIndices & | col_indices, | |||
const std::vector< std::vector< unsigned int > > & | row_lengths | |||
) |
Initialize the pattern with two BlockIndices for the block structures of matrix rows and columns as well as a row length vector in the format produced by DoFTools.
bool BlockSparsityPattern::is_compressed | ( | ) | const |
Return whether the structure is compressed or not, i.e. whether all sub-matrices are compressed.
Determine an estimate for the memory consumption (in bytes) of this object.
void BlockSparsityPattern::copy_from | ( | const BlockCompressedSparsityPattern & | csp | ) |
Copy data from an object of type BlockCompressedSparsityPattern, i.e. resize this object to the size of the given argument, and copy over the contents of each of the subobjects. Previous content of this object is lost.
void BlockSparsityPattern::copy_from | ( | const BlockCompressedSetSparsityPattern & | csp | ) |
Copy data from an object of type BlockCompressedSetSparsityPattern, i.e. resize this object to the size of the given argument, and copy over the contents of each of the subobjects. Previous content of this object is lost.
void BlockSparsityPattern::copy_from | ( | const BlockCompressedSimpleSparsityPattern & | csp | ) |
Copy data from an object of type BlockCompressedSimpleSparsityPattern, i.e. resize this object to the size of the given argument, and copy over the contents of each of the subobjects. Previous content of this object is lost.