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 | Static Public Attributes | List of all members
SparsityPatternBase Class Referenceabstract

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

Inheritance diagram for SparsityPatternBase:
[legend]

Public Types

using size_type = types::global_dof_index
 
using const_iterator = SparsityPatternIterators::Iterator
 
using iterator = SparsityPatternIterators::Iterator
 

Public Member Functions

Construction and Initialization

Constructors, destructor, functions initializing, copying and filling an object.

 SparsityPatternBase ()
 
 ~SparsityPatternBase () override=default
 
void reinit (const size_type m, const size_type n, const unsigned int max_per_row)
 
void reinit (const size_type m, const size_type n, const std::vector< unsigned int > &row_lengths)
 
virtual void reinit (const size_type m, const size_type n, const ArrayView< const unsigned int > &row_lengths)=0
 
void symmetrize ()
 
void add (const size_type i, const size_type j)
 
Iterators
iterator begin () const
 
iterator end () const
 
iterator begin (const size_type r) const
 
iterator end (const size_type r) const
 
Querying information
bool operator== (const SparsityPatternBase &) const
 
bool empty () const
 
bool exists (const size_type i, const size_type j) const
 
size_type max_entries_per_row () const
 
size_type bandwidth () const
 
std::size_t n_nonzero_elements () const
 
bool is_compressed () const
 
size_type n_rows () const
 
size_type n_cols () const
 
unsigned int row_length (const size_type row) const
 
std::size_t memory_consumption () const
 
Accessing entries
size_type column_number (const size_type row, const unsigned int index) const
 
size_type row_position (const size_type i, const size_type j) const
 
std::pair< size_type, size_typematrix_position (const std::size_t global_index) const
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
 Subscriptor (Subscriptor &&) noexcept
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (Subscriptor &&) noexcept
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
template<typename StreamType >
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Static Public Attributes

static const size_type invalid_entry = numbers::invalid_size_type
 

Input/Output

size_type max_dim
 
size_type rows
 
size_type cols
 
std::size_t max_vec_len
 
unsigned int max_row_length
 
std::unique_ptr< std::size_t[]> rowstart
 
std::unique_ptr< size_type[]> colnums
 
bool compressed
 
template<typename number >
class SparseMatrix
 
template<typename number >
class SparseLUDecomposition
 
template<typename number >
class SparseILU
 
template<typename number >
class ChunkSparseMatrix
 
class ChunkSparsityPattern
 
class DynamicSparsityPattern
 
class SparsityPatternIterators::Iterator
 
class SparsityPatternIterators::Accessor
 
class ChunkSparsityPatternIterators::Accessor
 
void print (std::ostream &out) const
 
void print_gnuplot (std::ostream &out) const
 
void print_svg (std::ostream &out) const
 
template<class Archive >
void save (Archive &ar, const unsigned int version) const
 
template<class Archive >
void load (Archive &ar, const unsigned int version)
 
template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 
static ::ExceptionBaseExcNotCompressed ()
 
static ::ExceptionBaseExcNotEnoughSpace (int arg1, int arg2)
 
static ::ExceptionBaseExcMatrixIsCompressed ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Subscriptor
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 

Detailed Description

A class that can store which elements of a matrix are nonzero (or, in fact, may be nonzero) and for which we have to allocate memory to store their values. This class is an example of the "static" type of sparsity patters (see Sparsity patterns). It uses the compressed row storage (CSR) format to store data, and is used as the basis for the derived SparsityPattern class and SparseMatrix class.

The elements of a SparsityPatternBase, corresponding to the places where SparseMatrix objects can store nonzero entries, are stored row-by-row. The ordering of non-zero elements within each row (i.e. increasing column index order) depends on the derived classes.

Author
Wolfgang Bangerth, Guido Kanschat and others

Definition at line 329 of file sparsity_pattern.h.


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