Reference documentation for deal.II version 9.2.0
|
#include <deal.II/lac/chunk_sparse_matrix.h>
Classes | |
struct | Traits |
Public Types | |
using | size_type = types::global_dof_index |
using | value_type = number |
using | real_type = typename numbers::NumberTraits< number >::real_type |
using | const_iterator = ChunkSparseMatrixIterators::Iterator< number, true > |
using | iterator = ChunkSparseMatrixIterators::Iterator< number, false > |
Public Member Functions | |
Constructors and initialization. | |
ChunkSparseMatrix () | |
ChunkSparseMatrix (const ChunkSparseMatrix &) | |
ChunkSparseMatrix (const ChunkSparsityPattern &sparsity) | |
ChunkSparseMatrix (const ChunkSparsityPattern &sparsity, const IdentityMatrix &id) | |
virtual | ~ChunkSparseMatrix () override |
ChunkSparseMatrix< number > & | operator= (const ChunkSparseMatrix< number > &) |
ChunkSparseMatrix< number > & | operator= (const IdentityMatrix &id) |
ChunkSparseMatrix & | operator= (const double d) |
virtual void | reinit (const ChunkSparsityPattern &sparsity) |
virtual void | clear () |
Information on the matrix | |
bool | empty () const |
size_type | m () const |
size_type | n () const |
size_type | n_nonzero_elements () const |
size_type | n_actually_nonzero_elements () const |
const ChunkSparsityPattern & | get_sparsity_pattern () const |
std::size_t | memory_consumption () const |
Modifying entries | |
void | set (const size_type i, const size_type j, const number value) |
void | add (const size_type i, const size_type j, const number value) |
template<typename number2 > | |
void | add (const size_type row, const size_type n_cols, const size_type *col_indices, const number2 *values, const bool elide_zero_values=true, const bool col_indices_are_sorted=false) |
ChunkSparseMatrix & | operator*= (const number factor) |
ChunkSparseMatrix & | operator/= (const number factor) |
void | symmetrize () |
template<typename somenumber > | |
ChunkSparseMatrix< number > & | copy_from (const ChunkSparseMatrix< somenumber > &source) |
template<typename ForwardIterator > | |
void | copy_from (const ForwardIterator begin, const ForwardIterator end) |
template<typename somenumber > | |
void | copy_from (const FullMatrix< somenumber > &matrix) |
template<typename somenumber > | |
void | add (const number factor, const ChunkSparseMatrix< somenumber > &matrix) |
Entry Access | |
number | operator() (const size_type i, const size_type j) const |
number | el (const size_type i, const size_type j) const |
number | diag_element (const size_type i) const |
void | extract_row_copy (const size_type row, const size_type array_length, size_type &row_length, size_type *column_indices, number *values) const |
Matrix vector multiplications | |
template<class OutVector , class InVector > | |
void | vmult (OutVector &dst, const InVector &src) const |
template<class OutVector , class InVector > | |
void | Tvmult (OutVector &dst, const InVector &src) const |
template<class OutVector , class InVector > | |
void | vmult_add (OutVector &dst, const InVector &src) const |
template<class OutVector , class InVector > | |
void | Tvmult_add (OutVector &dst, const InVector &src) const |
template<typename somenumber > | |
somenumber | matrix_norm_square (const Vector< somenumber > &v) const |
template<typename somenumber > | |
somenumber | matrix_scalar_product (const Vector< somenumber > &u, const Vector< somenumber > &v) const |
template<typename somenumber > | |
somenumber | residual (Vector< somenumber > &dst, const Vector< somenumber > &x, const Vector< somenumber > &b) const |
Matrix norms | |
real_type | l1_norm () const |
real_type | linfty_norm () const |
real_type | frobenius_norm () const |
Preconditioning methods | |
template<typename somenumber > | |
void | precondition_Jacobi (Vector< somenumber > &dst, const Vector< somenumber > &src, const number omega=1.) const |
template<typename somenumber > | |
void | precondition_SSOR (Vector< somenumber > &dst, const Vector< somenumber > &src, const number om=1.) const |
template<typename somenumber > | |
void | precondition_SOR (Vector< somenumber > &dst, const Vector< somenumber > &src, const number om=1.) const |
template<typename somenumber > | |
void | precondition_TSOR (Vector< somenumber > &dst, const Vector< somenumber > &src, const number om=1.) const |
template<typename somenumber > | |
void | SSOR (Vector< somenumber > &v, const number omega=1.) const |
template<typename somenumber > | |
void | SOR (Vector< somenumber > &v, const number om=1.) const |
template<typename somenumber > | |
void | TSOR (Vector< somenumber > &v, const number om=1.) const |
template<typename somenumber > | |
void | PSOR (Vector< somenumber > &v, const std::vector< size_type > &permutation, const std::vector< size_type > &inverse_permutation, const number om=1.) const |
template<typename somenumber > | |
void | TPSOR (Vector< somenumber > &v, const std::vector< size_type > &permutation, const std::vector< size_type > &inverse_permutation, const number om=1.) const |
template<typename somenumber > | |
void | SOR_step (Vector< somenumber > &v, const Vector< somenumber > &b, const number om=1.) const |
template<typename somenumber > | |
void | TSOR_step (Vector< somenumber > &v, const Vector< somenumber > &b, const number om=1.) const |
template<typename somenumber > | |
void | SSOR_step (Vector< somenumber > &v, const Vector< somenumber > &b, const number om=1.) const |
Iterators | |
const_iterator | begin () const |
const_iterator | end () const |
iterator | begin () |
iterator | end () |
const_iterator | begin (const unsigned int r) const |
const_iterator | end (const unsigned int r) const |
iterator | begin (const unsigned int r) |
iterator | end (const unsigned int r) |
Public Member Functions inherited from Subscriptor | |
Subscriptor () | |
Subscriptor (const Subscriptor &) | |
Subscriptor (Subscriptor &&) noexcept | |
virtual | ~Subscriptor () |
Subscriptor & | operator= (const Subscriptor &) |
Subscriptor & | operator= (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) |
Input/Output | |
SmartPointer< const ChunkSparsityPattern, ChunkSparseMatrix< number > > | cols |
std::unique_ptr< number[]> | val |
size_type | max_len |
template<typename somenumber > | |
class | ChunkSparseMatrix |
template<typename , bool > | |
class | ChunkSparseMatrixIterators::Iterator |
template<typename , bool > | |
class | ChunkSparseMatrixIterators::Accessor |
void | print (std::ostream &out) const |
void | print_formatted (std::ostream &out, const unsigned int precision=3, const bool scientific=true, const unsigned int width=0, const char *zero_string=" ", const double denominator=1.) const |
void | print_pattern (std::ostream &out, const double threshold=0.) const |
void | block_write (std::ostream &out) const |
void | block_read (std::istream &in) |
static ::ExceptionBase & | ExcInvalidIndex (int arg1, int arg2) |
static ::ExceptionBase & | ExcDifferentChunkSparsityPatterns () |
static ::ExceptionBase & | ExcIteratorRange (int arg1, int arg2) |
static ::ExceptionBase & | ExcSourceEqualsDestination () |
size_type | compute_location (const size_type i, const size_type j) const |
Additional Inherited Members | |
Static Public Member Functions inherited from Subscriptor | |
static ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
Sparse matrix. This class implements the function to store values in the locations of a sparse matrix denoted by a SparsityPattern. The separation of sparsity pattern and values is done since one can store data elements of different type in these locations without the SparsityPattern having to know this, and more importantly one can associate more than one matrix with the same sparsity pattern.
The use of this class is demonstrated in step-51.
<float> and <double>
; others can be generated in application programs (see the section on Template instantiations in the manual).Definition at line 423 of file chunk_sparse_matrix.h.