![]() |
Reference documentation for deal.II version 8.1.0
|
#include <block_sparsity_pattern.h>
Public Member Functions | |
BlockSparsityPattern () | |
BlockSparsityPattern (const size_type n_rows, const size_type n_columns) | |
void | reinit (const size_type n_block_rows, const size_type 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 |
std::size_t | memory_consumption () const |
void | copy_from (const BlockCompressedSparsityPattern &csp) |
void | copy_from (const BlockCompressedSetSparsityPattern &csp) |
void | copy_from (const BlockCompressedSimpleSparsityPattern &csp) |
![]() | |
BlockSparsityPatternBase () | |
BlockSparsityPatternBase (const size_type n_block_rows, const size_type n_block_columns) | |
BlockSparsityPatternBase (const BlockSparsityPatternBase &bsp) | |
~BlockSparsityPatternBase () | |
void | reinit (const size_type n_block_rows, const size_type n_block_columns) |
BlockSparsityPatternBase & | operator= (const BlockSparsityPatternBase &) |
void | collect_sizes () |
SparsityPattern & | block (const size_type row, const size_type column) |
const SparsityPattern & | block (const size_type row, const size_type column) const |
const BlockIndices & | get_row_indices () const |
const BlockIndices & | get_column_indices () const |
void | compress () |
size_type | n_block_rows () const |
size_type | n_block_cols () const |
bool | empty () const |
size_type | max_entries_per_row () const |
void | add (const size_type i, const size_type j) |
void | add_entries (const size_type row, ForwardIterator begin, ForwardIterator end, const bool indices_are_sorted=false) |
size_type | n_rows () const |
size_type | n_cols () const |
bool | exists (const size_type i, const size_type j) const |
unsigned int | row_length (const size_type row) const |
size_type | n_nonzero_elements () const |
void | print (std::ostream &out) const |
void | print_gnuplot (std::ostream &out) const |
DeclException4 (ExcIncompatibleRowNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing row numbers.") | |
DeclException4 (ExcIncompatibleColNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing column numbers.") | |
DeclException0 (ExcInvalidConstructorCall) | |
![]() | |
Subscriptor () | |
Subscriptor (const Subscriptor &) | |
virtual | ~Subscriptor () |
Subscriptor & | operator= (const Subscriptor &) |
void | subscribe (const char *identifier=0) const |
void | unsubscribe (const char *identifier=0) const |
unsigned int | n_subscriptions () const |
void | list_subscribers () const |
DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects.\n"<< "(Additional information: "<< arg3<< ")\n"<< "Note the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "more information on what this error means.") | |
DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier \""<< arg2<< "\" did subscribe to this object of class "<< arg1) | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Additional Inherited Members | |
![]() | |
typedef types::global_dof_index | size_type |
![]() | |
static const size_type | invalid_entry |
![]() | |
size_type | rows |
size_type | columns |
Table< 2, SmartPointer< SparsityPattern, BlockSparsityPatternBase< SparsityPattern > > > | sub_objects |
BlockIndices | row_indices |
BlockIndices | column_indices |
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.
Definition at line 490 of file block_sparsity_pattern.h.
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.
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.
|
inline |
Forwarding to BlockSparsityPatternBase::reinit().
Definition at line 1375 of file block_sparsity_pattern.h.
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.
The row length vector should be in the format produced by DoFTools. Alternatively, there is a simplified version, where each of the inner vectors has length one. Then, the corresponding entry is used as the maximal row length.
For the diagonal blocks, the inner SparsityPattern is initialized with optimized diagonals, while this is not done for the off-diagonal blocks.
bool BlockSparsityPattern::is_compressed | ( | ) | const |
Return whether the structure is compressed or not, i.e. whether all sub-matrices are compressed.
std::size_t BlockSparsityPattern::memory_consumption | ( | ) | const |
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.