Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Private Attributes | Friends | List of all members
BlockSparsityPatternBase< SparsityPatternType > Class Template Reference

#include <deal.II/lac/affine_constraints.h>

Inheritance diagram for BlockSparsityPatternBase< SparsityPatternType >:
[legend]

Public Types

using size_type = types::global_dof_index
 

Public Member Functions

 BlockSparsityPatternBase ()
 
 BlockSparsityPatternBase (const size_type n_block_rows, const size_type n_block_columns)
 
 BlockSparsityPatternBase (const BlockSparsityPatternBase &bsp)
 
 ~BlockSparsityPatternBase () override
 
void reinit (const size_type n_block_rows, const size_type n_block_columns)
 
BlockSparsityPatternBaseoperator= (const BlockSparsityPatternBase &)
 
void collect_sizes ()
 
SparsityPatternType & block (const size_type row, const size_type column)
 
const SparsityPatternType & 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)
 
template<typename ForwardIterator >
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
 

Static Public Member Functions

static ::ExceptionBaseExcIncompatibleRowNumbers (int arg1, int arg2, int arg3, int arg4)
 
static ::ExceptionBaseExcIncompatibleColNumbers (int arg1, int arg2, int arg3, int arg4)
 

Static Public Attributes

static const size_type invalid_entry = SparsityPattern::invalid_entry
 

Protected Attributes

size_type rows
 
size_type columns
 
Table< 2, SmartPointer< SparsityPatternType, BlockSparsityPatternBase< SparsityPatternType > > > sub_objects
 
BlockIndices row_indices
 
BlockIndices column_indices
 

Private Attributes

std::vector< size_typecounter_within_block
 
std::vector< std::vector< size_type > > block_column_indices
 

Friends

template<typename number >
class BlockSparseMatrix
 

Detailed Description

template<typename SparsityPatternType>
class BlockSparsityPatternBase< SparsityPatternType >

This is the base class for block versions of the sparsity pattern and dynamic sparsity pattern classes. It has not much functionality, but only administrates an array of sparsity pattern objects and delegates work to them. It has mostly the same interface as has the SparsityPattern, and DynamicSparsityPattern, and simply transforms calls to its member functions to calls to the respective member functions of the member sparsity patterns.

The largest difference between the SparsityPattern and DynamicSparsityPattern classes and this class is that mostly, the matrices have different properties and you will want to work on the blocks making up the matrix rather than the whole matrix. You can access the different blocks using the block(row,col) function.

Attention: this object is not automatically notified if the size of one of its subobjects' size is changed. After you initialize the sizes of the subobjects, you will therefore have to call the collect_sizes() function of this class! Note that, of course, all sub-matrices in a (block-)row have to have the same number of rows, and that all sub-matrices in a (block-)column have to have the same number of columns.

You will in general not want to use this class, but one of the derived classes.

Todo:
Handle optimization of diagonal elements of the underlying SparsityPattern correctly.
See also
Block (linear algebra)
Author
Wolfgang Bangerth, 2000, 2001

Definition at line 1905 of file affine_constraints.h.


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