Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
BlockCompressedSimpleSparsityPattern Class Reference

#include <block_sparsity_pattern.h>

Inheritance diagram for BlockCompressedSimpleSparsityPattern:
[legend]

Public Member Functions

 BlockCompressedSimpleSparsityPattern ()
 
 BlockCompressedSimpleSparsityPattern (const size_type n_rows, const size_type n_columns)
 
 BlockCompressedSimpleSparsityPattern (const std::vector< size_type > &row_block_sizes, const std::vector< size_type > &col_block_sizes)
 
 BlockCompressedSimpleSparsityPattern (const std::vector< IndexSet > &partitioning)
 
void reinit (const std::vector< size_type > &row_block_sizes, const std::vector< size_type > &col_block_sizes)
 
void reinit (const std::vector< IndexSet > &partitioning)
 
size_type column_number (const size_type row, const unsigned int index) const
 
- Public Member Functions inherited from BlockSparsityPatternBase< CompressedSimpleSparsityPattern >
 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)
 
BlockSparsityPatternBaseoperator= (const BlockSparsityPatternBase &)
 
void collect_sizes ()
 
CompressedSimpleSparsityPatternblock (const size_type row, const size_type column)
 
const
CompressedSimpleSparsityPattern
block (const size_type row, const size_type column) const
 
const BlockIndicesget_row_indices () const
 
const BlockIndicesget_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)
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (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

- Public Types inherited from BlockSparsityPatternBase< CompressedSimpleSparsityPattern >
typedef types::global_dof_index size_type
 
- Static Public Attributes inherited from BlockSparsityPatternBase< CompressedSimpleSparsityPattern >
static const size_type invalid_entry
 
- Protected Attributes inherited from BlockSparsityPatternBase< CompressedSimpleSparsityPattern >
size_type rows
 
size_type columns
 
Table< 2, SmartPointer
< CompressedSimpleSparsityPattern,
BlockSparsityPatternBase
< CompressedSimpleSparsityPattern > > > 
sub_objects
 
BlockIndices row_indices
 
BlockIndices column_indices
 

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 CompressedSimpleSparsityPattern 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: There are several, exchangeable variations of this class, see Sparsity patterns, section 'Dynamic block sparsity patterns' for more information.

This class is used in step-22 and step-31.

Author
Timo Heister, 2008

Definition at line 888 of file block_sparsity_pattern.h.

Constructor & Destructor Documentation

BlockCompressedSimpleSparsityPattern::BlockCompressedSimpleSparsityPattern ( )

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.

BlockCompressedSimpleSparsityPattern::BlockCompressedSimpleSparsityPattern ( const size_type  n_rows,
const size_type  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.

BlockCompressedSimpleSparsityPattern::BlockCompressedSimpleSparsityPattern ( const std::vector< size_type > &  row_block_sizes,
const std::vector< size_type > &  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.

BlockCompressedSimpleSparsityPattern::BlockCompressedSimpleSparsityPattern ( const std::vector< IndexSet > &  partitioning)

Initialize the pattern with symmetric blocks. The number of IndexSets in the vector determine the number of rows and columns of blocks. The size of each block is determined by the size() of the respective IndexSet. Each block only stores the rows given by the values in the IndexSet, which is useful for distributed memory parallel computations and usually corresponds to the locally owned DoFs.

Member Function Documentation

void BlockCompressedSimpleSparsityPattern::reinit ( const std::vector< size_type > &  row_block_sizes,
const std::vector< size_type > &  col_block_sizes 
)

Resize the pattern 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].

void BlockCompressedSimpleSparsityPattern::reinit ( const std::vector< IndexSet > &  partitioning)

Resize the pattern with symmetric blocks determined by the size() of each IndexSet. See the constructor taking a vector of IndexSets for details.

BlockCompressedSimpleSparsityPattern::size_type BlockCompressedSimpleSparsityPattern::column_number ( const size_type  row,
const unsigned int  index 
) const
inline

Access to column number field. Return the column number of the index th entry in row row.

Definition at line 1348 of file block_sparsity_pattern.h.


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