![]() |
deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20:01+00:00
|
#include <deal.II/lac/block_sparse_matrix_ez.h>
A block matrix consisting of blocks of type SparseMatrixEZ.
Like the other Block-objects, this matrix can be used like a SparseMatrixEZ, when it comes to access to entries. Then, there are functions for the multiplication with BlockVector and access to the individual blocks.
Definition at line 54 of file block_sparse_matrix_ez.h.
Public Types | |
| using | BaseClass = BlockMatrixBase< SparseMatrixEZ< Number > > |
| using | size_type = types::global_dof_index |
| using | BlockType = SparseMatrixEZ< Number > |
| using | value_type = typename BlockType::value_type |
| using | real_type = typename numbers::NumberTraits< value_type >::real_type |
| using | pointer = value_type * |
| using | const_pointer = const value_type * |
| using | reference = value_type & |
| using | const_reference = const value_type & |
| using | iterator = MatrixIterator< BlockMatrixIterators::Accessor< BlockMatrixBase, false > > |
| using | const_iterator = MatrixIterator< BlockMatrixIterators::Accessor< BlockMatrixBase, true > > |
Public Member Functions | |
| BlockSparseMatrixEZ ()=default | |
| BlockSparseMatrixEZ (const unsigned int block_rows, const unsigned int block_cols) | |
| BlockSparseMatrixEZ (const BlockSparseMatrixEZ< Number > &) | |
| BlockSparseMatrixEZ & | operator= (const BlockSparseMatrixEZ< Number > &) |
| BlockSparseMatrixEZ & | operator= (const double d) |
| void | clear () |
| void | reinit (const unsigned int n_block_rows, const unsigned int n_block_cols) |
| void | collect_sizes () |
| bool | empty () const |
| template<typename StreamType > | |
| void | print_statistics (StreamType &s, bool full=false) |
| BlockMatrixBase & | copy_from (const BlockMatrixType &source) |
| BlockType & | block (const unsigned int row, const unsigned int column) |
| const BlockType & | block (const unsigned int row, const unsigned int column) const |
| size_type | m () const |
| size_type | n () const |
| unsigned int | n_block_rows () const |
| unsigned int | n_block_cols () const |
| void | set (const size_type i, const size_type j, const value_type value) |
| void | set (const std::vector< size_type > &indices, const FullMatrix< number > &full_matrix, const bool elide_zero_values=false) |
| void | set (const std::vector< size_type > &row_indices, const std::vector< size_type > &col_indices, const FullMatrix< number > &full_matrix, const bool elide_zero_values=false) |
| void | set (const size_type row, const std::vector< size_type > &col_indices, const std::vector< number > &values, const bool elide_zero_values=false) |
| void | set (const size_type row, const size_type n_cols, const size_type *col_indices, const number *values, const bool elide_zero_values=false) |
| void | add (const size_type i, const size_type j, const value_type value) |
| void | add (const std::vector< size_type > &indices, const FullMatrix< number > &full_matrix, const bool elide_zero_values=true) |
| void | add (const std::vector< size_type > &row_indices, const std::vector< size_type > &col_indices, const FullMatrix< number > &full_matrix, const bool elide_zero_values=true) |
| void | add (const size_type row, const std::vector< size_type > &col_indices, const std::vector< number > &values, const bool elide_zero_values=true) |
| void | add (const size_type row, const size_type n_cols, const size_type *col_indices, const number *values, const bool elide_zero_values=true, const bool col_indices_are_sorted=false) |
| void | add (const value_type factor, const BlockMatrixBase< SparseMatrixEZ< Number > > &matrix) |
| value_type | operator() (const size_type i, const size_type j) const |
| value_type | el (const size_type i, const size_type j) const |
| value_type | diag_element (const size_type i) const |
| void | compress (VectorOperation::values operation) |
| BlockMatrixBase & | operator*= (const value_type factor) |
| BlockMatrixBase & | operator/= (const value_type factor) |
| void | vmult_add (BlockVectorType &dst, const BlockVectorType &src) const |
| void | Tvmult_add (BlockVectorType &dst, const BlockVectorType &src) const |
| value_type | matrix_norm_square (const BlockVectorType &v) const |
| real_type | frobenius_norm () const |
| value_type | matrix_scalar_product (const BlockVectorType &u, const BlockVectorType &v) const |
| value_type | residual (BlockVectorType &dst, const BlockVectorType &x, const BlockVectorType &b) const |
| void | print (std::ostream &out, const bool alternative_output=false) const |
| iterator | begin () |
| iterator | begin (const size_type r) |
| const_iterator | begin () const |
| const_iterator | begin (const size_type r) const |
| iterator | end () |
| iterator | end (const size_type r) |
| const_iterator | end () const |
| const_iterator | end (const size_type r) const |
| const BlockIndices & | get_row_indices () const |
| const BlockIndices & | get_column_indices () const |
| std::size_t | memory_consumption () const |
| template<class Archive > | |
| void | serialize (Archive &ar, const unsigned int version) |
Multiplications | |
| template<typename block_number > | |
| void | vmult (BlockVector< block_number > &dst, const BlockVector< block_number > &src) const |
| template<typename block_number , typename nonblock_number > | |
| void | vmult (BlockVector< block_number > &dst, const Vector< nonblock_number > &src) const |
| template<typename block_number , typename nonblock_number > | |
| void | vmult (Vector< nonblock_number > &dst, const BlockVector< block_number > &src) const |
| template<typename nonblock_number > | |
| void | vmult (Vector< nonblock_number > &dst, const Vector< nonblock_number > &src) const |
| template<typename block_number > | |
| void | Tvmult (BlockVector< block_number > &dst, const BlockVector< block_number > &src) const |
| template<typename block_number , typename nonblock_number > | |
| void | Tvmult (BlockVector< block_number > &dst, const Vector< nonblock_number > &src) const |
| template<typename block_number , typename nonblock_number > | |
| void | Tvmult (Vector< nonblock_number > &dst, const BlockVector< block_number > &src) const |
| template<typename nonblock_number > | |
| void | Tvmult (Vector< nonblock_number > &dst, const Vector< nonblock_number > &src) const |
Querying the observer pointers an object has. | |
| unsigned int | n_subscriptions () const |
| template<typename StreamType > | |
| void | list_subscribers (StreamType &stream) const |
| void | list_subscribers () const |
Static Public Member Functions | |
| static ::ExceptionBase & | ExcIncompatibleRowNumbers (int arg1, int arg2, int arg3, int arg4) |
| static ::ExceptionBase & | ExcIncompatibleColNumbers (int arg1, int arg2, int arg3, int arg4) |
| static ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
| static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
Protected Member Functions | |
| void | vmult_block_block (BlockVectorType &dst, const BlockVectorType &src) const |
| void | vmult_block_nonblock (BlockVectorType &dst, const VectorType &src) const |
| void | vmult_nonblock_block (VectorType &dst, const BlockVectorType &src) const |
| void | vmult_nonblock_nonblock (VectorType &dst, const VectorType &src) const |
| void | Tvmult_block_block (BlockVectorType &dst, const BlockVectorType &src) const |
| void | Tvmult_block_nonblock (BlockVectorType &dst, const VectorType &src) const |
| void | Tvmult_nonblock_block (VectorType &dst, const BlockVectorType &src) const |
| void | Tvmult_nonblock_nonblock (VectorType &dst, const VectorType &src) const |
| void | prepare_add_operation () |
| void | prepare_set_operation () |
Protected Attributes | |
| BlockIndices | row_block_indices |
| BlockIndices | column_block_indices |
| Table< 2, ObserverPointer< BlockType, BlockMatrixBase< SparseMatrixEZ< Number > > > > | sub_objects |
Private Member Functions | |
EnableObserverPointer functionality | |
Classes derived from EnableObserverPointer provide a facility to subscribe to this object. This is mostly used by the ObserverPointer class. | |
| void | subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
| void | unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
| void | check_no_subscribers () const noexcept |
Private Attributes | |
| TemporaryData | temporary_data |
| std::atomic< unsigned int > | counter |
| std::map< std::string, unsigned int > | counter_map |
| std::vector< std::atomic< bool > * > | validity_pointers |
| const std::type_info * | object_info |
Static Private Attributes | |
| static std::mutex | mutex |
| using BlockSparseMatrixEZ< Number >::BaseClass = BlockMatrixBase<SparseMatrixEZ<Number> > |
Typedef the base class for simpler access to its own alias.
Definition at line 60 of file block_sparse_matrix_ez.h.
| using BlockSparseMatrixEZ< Number >::size_type = types::global_dof_index |
Declare type for container size.
Definition at line 65 of file block_sparse_matrix_ez.h.
|
inherited |
Typedef the type of the underlying matrix.
Definition at line 353 of file block_matrix_base.h.
|
inherited |
Type of matrix entries. These are analogous to alias in the standard library containers.
Definition at line 359 of file block_matrix_base.h.
|
inherited |
Definition at line 360 of file block_matrix_base.h.
|
inherited |
Definition at line 361 of file block_matrix_base.h.
|
inherited |
Definition at line 362 of file block_matrix_base.h.
|
inherited |
Definition at line 363 of file block_matrix_base.h.
|
inherited |
Definition at line 364 of file block_matrix_base.h.
|
inherited |
Definition at line 367 of file block_matrix_base.h.
|
inherited |
Definition at line 370 of file block_matrix_base.h.
|
default |
Default constructor. The result is an empty object with zero dimensions.
| BlockSparseMatrixEZ< Number >::BlockSparseMatrixEZ | ( | const unsigned int | block_rows, |
| const unsigned int | block_cols | ||
| ) |
Constructor setting up an object with given number of block rows and columns. The blocks themselves still have zero dimension.
| BlockSparseMatrixEZ< Number >::BlockSparseMatrixEZ | ( | const BlockSparseMatrixEZ< Number > & | ) |
Copy constructor. This is needed for some container classes. It creates an object of the same number of block rows and columns. To avoid unwanted loss of information, the blocks of the other matrix must be empty.
| BlockSparseMatrixEZ & BlockSparseMatrixEZ< Number >::operator= | ( | const BlockSparseMatrixEZ< Number > & | ) |
Copy operator. Like the copy constructor, this may be called for objects with empty blocks only.
| BlockSparseMatrixEZ & BlockSparseMatrixEZ< Number >::operator= | ( | const double | d | ) |
This operator assigns a scalar to a matrix. Since this does usually not make much sense (should we set all matrix entries to this value? Only the nonzero entries of the sparsity pattern?), this operation is only allowed if the actual value to be assigned is zero. This operator only exists to allow for the obvious notation matrix=0, which sets all elements of the matrix to zero, but keep the sparsity pattern previously used.
| void BlockSparseMatrixEZ< Number >::clear | ( | ) |
Set matrix to zero dimensions and release memory.
| void BlockSparseMatrixEZ< Number >::reinit | ( | const unsigned int | n_block_rows, |
| const unsigned int | n_block_cols | ||
| ) |
Initialize to given block numbers. After this operation, the matrix will have the block dimensions provided. Each block will have zero dimensions and must be initialized subsequently. After setting the sizes of the blocks, collect_sizes() must be called to update internal data structures.
| void BlockSparseMatrixEZ< Number >::collect_sizes | ( | ) |
This function collects the sizes of the sub-objects and stores them in internal arrays, in order to be able to relay global indices into the matrix to indices into the subobjects. You must call this function each time after you have changed the size of the sub-objects.
| bool BlockSparseMatrixEZ< Number >::empty | ( | ) | const |
Return whether the object is empty. It is empty if no memory is allocated, which is the same as that both dimensions are zero. This function is just the concatenation of the respective call to all sub-matrices.
|
inline |
Matrix-vector multiplication: let \(dst = M*src\) with \(M\) being this matrix.
Definition at line 233 of file block_sparse_matrix_ez.h.
|
inline |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block column.
Definition at line 242 of file block_sparse_matrix_ez.h.
|
inline |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block row.
Definition at line 251 of file block_sparse_matrix_ez.h.
|
inline |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block.
Definition at line 260 of file block_sparse_matrix_ez.h.
|
inline |
Matrix-vector multiplication: let \(dst = M^T*src\) with \(M\) being this matrix. This function does the same as vmult() but takes the transposed matrix.
Definition at line 269 of file block_sparse_matrix_ez.h.
|
inline |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block row.
Definition at line 278 of file block_sparse_matrix_ez.h.
|
inline |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block column.
Definition at line 287 of file block_sparse_matrix_ez.h.
|
inline |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block.
Definition at line 296 of file block_sparse_matrix_ez.h.
|
inline |
Print statistics. If full is true, prints a histogram of all existing row lengths and allocated row lengths. Otherwise, just the relation of allocated and used entries is shown.
Definition at line 307 of file block_sparse_matrix_ez.h.
|
inherited |
Copy the matrix given as argument into the current object.
Copying matrices is an expensive operation that we do not want to happen by accident through compiler generated code for operator=. (This would happen, for example, if one accidentally declared a function argument of the current type by value rather than by reference.) The functionality of copying matrices is implemented in this member function instead. All copy operations of objects of this type therefore require an explicit function call.
The source matrix may be a matrix of arbitrary type, as long as its data type is convertible to the data type of this matrix.
The function returns a reference to this.
|
inherited |
Access the block with the given coordinates.
|
inherited |
Access the block with the given coordinates. Version for constant objects.
|
inherited |
Return the dimension of the codomain (or range) space. Note that the matrix is of dimension \(m \times n\).
|
inherited |
Return the dimension of the domain space. Note that the matrix is of dimension \(m \times n\).
|
inherited |
Return the number of blocks in a column. Returns zero if no sparsity pattern is presently associated to this matrix.
|
inherited |
Return the number of blocks in a row. Returns zero if no sparsity pattern is presently associated to this matrix.
|
inherited |
Set the element (i,j) to value. Throws an error if the entry does not exist or if value is not a finite number. Still, it is allowed to store zero values in non-existent fields.
|
inherited |
Set all elements given in a FullMatrix into the sparse matrix locations given by indices. In other words, this function writes the elements in full_matrix into the calling matrix, using the local-to-global indexing specified by indices for both the rows and the columns of the matrix. This function assumes a quadratic sparse matrix and a quadratic full_matrix, the usual situation in FE calculations.
The optional parameter elide_zero_values can be used to specify whether zero values should be set anyway or they should be filtered away (and not change the previous content in the respective element if it exists). The default value is false, i.e., even zero values are treated.
|
inherited |
Same function as before, but now including the possibility to use rectangular full_matrices and different local-to-global indexing on rows and columns, respectively.
|
inherited |
Set several elements in the specified row of the matrix with column indices as given by col_indices to the respective value.
The optional parameter elide_zero_values can be used to specify whether zero values should be set anyway or they should be filtered away (and not change the previous content in the respective element if it exists). The default value is false, i.e., even zero values are treated.
|
inherited |
Set several elements to values given by values in a given row in columns given by col_indices into the sparse matrix.
The optional parameter elide_zero_values can be used to specify whether zero values should be inserted anyway or they should be filtered away. The default value is false, i.e., even zero values are inserted/replaced.
|
inherited |
Add value to the element (i,j). Throws an error if the entry does not exist or if value is not a finite number. Still, it is allowed to store zero values in non-existent fields.
|
inherited |
Add all elements given in a FullMatrix<double> into sparse matrix locations given by indices. In other words, this function adds the elements in full_matrix to the respective entries in calling matrix, using the local-to-global indexing specified by indices for both the rows and the columns of the matrix. This function assumes a quadratic sparse matrix and a quadratic full_matrix, the usual situation in FE calculations.
The optional parameter elide_zero_values can be used to specify whether zero values should be added anyway or these should be filtered away and only non-zero data is added. The default value is true, i.e., zero values won't be added into the matrix.
|
inherited |
Same function as before, but now including the possibility to use rectangular full_matrices and different local-to-global indexing on rows and columns, respectively.
|
inherited |
Set several elements in the specified row of the matrix with column indices as given by col_indices to the respective value.
The optional parameter elide_zero_values can be used to specify whether zero values should be added anyway or these should be filtered away and only non-zero data is added. The default value is true, i.e., zero values won't be added into the matrix.
|
inherited |
Add an array of values given by values in the given global matrix row at columns specified by col_indices in the sparse matrix.
The optional parameter elide_zero_values can be used to specify whether zero values should be added anyway or these should be filtered away and only non-zero data is added. The default value is true, i.e., zero values won't be added into the matrix.
|
inherited |
Add matrix scaled by factor to this matrix, i.e. the matrix factor*matrix is added to this. If the sparsity pattern of the calling matrix does not contain all the elements in the sparsity pattern of the input matrix, this function will throw an exception.
Depending on MatrixType, however, additional restrictions might arise. Some sparse matrix formats require matrix to be based on the same sparsity pattern as the calling matrix.
|
inherited |
Return the value of the entry (i,j). This may be an expensive operation and you should always take care where to call this function. In order to avoid abuse, this function throws an exception if the wanted element does not exist in the matrix.
|
inherited |
This function is mostly like operator()() in that it returns the value of the matrix entry (i,j). The only difference is that if this entry does not exist in the sparsity pattern, then instead of raising an exception, zero is returned. While this may be convenient in some cases, note that it is simple to write algorithms that are slow compared to an optimal solution, since the sparsity of the matrix is not used.
|
inherited |
Return the main diagonal element in the ith row. This function throws an error if the matrix is not quadratic and also if the diagonal blocks of the matrix are not quadratic.
This function is considerably faster than the operator()(), since for quadratic matrices, the diagonal entry may be the first to be stored in each row and access therefore does not involve searching for the right column number.
|
inherited |
Call the compress() function on all the subblocks of the matrix.
See Compressing distributed objects for more information.
|
inherited |
Multiply the entire matrix by a fixed factor.
|
inherited |
Divide the entire matrix by a fixed factor.
|
inherited |
Adding Matrix-vector multiplication. Add \(M*src\) on \(dst\) with \(M\) being this matrix.
|
inherited |
Adding Matrix-vector multiplication. Add MTsrc to dst with M being this matrix. This function does the same as vmult_add() but takes the transposed matrix.
|
inherited |
Return the norm of the vector v with respect to the norm induced by this matrix, i.e. vTMv). This is useful, e.g. in the finite element context, where the LT-norm of a function equals the matrix norm with respect to the mass matrix of the vector representing the nodal values of the finite element function. Note that even though the function's name might suggest something different, for historic reasons not the norm but its square is returned, as defined above by the scalar product.
Obviously, the matrix needs to be square for this operation.
|
inherited |
Return the frobenius norm of the matrix, i.e. the square root of the sum of squares of all entries in the matrix.
|
inherited |
Compute the matrix scalar product \(\left(u,Mv\right)\).
|
inherited |
Compute the residual r=b-Ax. Write the residual into dst.
|
inherited |
Print the matrix to the given stream, using the format (line,col) value, i.e. one nonzero entry of the matrix per line. The optional flag outputs the sparsity pattern in a different style according to the underlying sparse matrix type.
|
inherited |
Iterator starting at the first entry.
|
inherited |
Iterator starting at the first entry of row r.
|
inherited |
Iterator starting at the first entry.
|
inherited |
Iterator starting at the first entry of row r.
|
inherited |
Final iterator.
|
inherited |
Final iterator of row r.
|
inherited |
Final iterator.
|
inherited |
Final iterator of row r.
|
inherited |
Return a reference to the underlying BlockIndices data of the rows.
|
inherited |
Return a reference to the underlying BlockIndices data of the columns.
|
inherited |
Determine an estimate for the memory consumption (in bytes) of this object. Note that only the memory reserved on the current processor is returned in case this is called in an MPI-based program.
|
staticinherited |
Exception
|
staticinherited |
Exception
|
protectedinherited |
Matrix-vector multiplication: let \(dst = M*src\) with \(M\) being this matrix.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protectedinherited |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block column.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protectedinherited |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block row.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protectedinherited |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protectedinherited |
Matrix-vector multiplication: let \(dst = M^T*src\) with \(M\) being this matrix. This function does the same as vmult() but takes the transposed matrix.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protectedinherited |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block row.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protectedinherited |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block column.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protectedinherited |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protectedinherited |
Some matrix types, in particular PETSc, need to synchronize set and add operations. This has to be done for all matrices in the BlockMatrix. This routine prepares adding of elements by notifying all blocks. Called by all internal routines before adding elements.
|
protectedinherited |
Notifies all blocks to let them prepare for setting elements, see prepare_add_operation().
|
inlineinherited |
Return the present number of subscriptions to this object. This allows to use this class for reference counted lifetime determination where the last one to unsubscribe also deletes the object.
Definition at line 318 of file enable_observer_pointer.h.
|
inlineinherited |
List the subscribers to the input stream.
Definition at line 335 of file enable_observer_pointer.h.
|
inherited |
List the subscribers to deallog.
Definition at line 200 of file enable_observer_pointer.cc.
|
inlineinherited |
Read or write the data of this object to or from a stream for the purpose of serialization using the BOOST serialization library.
This function does not actually serialize any of the member variables of this class. The reason is that what this class stores is only who subscribes to this object, but who does so at the time of storing the contents of this object does not necessarily have anything to do with who subscribes to the object when it is restored. Consequently, we do not want to overwrite the subscribers at the time of restoring, and then there is no reason to write the subscribers out in the first place.
Definition at line 327 of file enable_observer_pointer.h.
|
privateinherited |
Subscribes a user of the object by storing the pointer validity. The subscriber may be identified by text supplied as identifier.
Definition at line 136 of file enable_observer_pointer.cc.
|
privateinherited |
Unsubscribes a user from the object.
identifier and the validity pointer must be the same as the one supplied to subscribe(). Definition at line 154 of file enable_observer_pointer.cc.
|
privatenoexceptinherited |
Check that there are no objects subscribing to this object. If this check passes then it is safe to destroy the current object. It this check fails then this function will either abort or print an error message to deallog (by using the AssertNothrow mechanism), but will not throw an exception.
Definition at line 58 of file enable_observer_pointer.cc.
|
protectedinherited |
Index arrays for rows and columns.
Definition at line 844 of file block_matrix_base.h.
|
protectedinherited |
Definition at line 845 of file block_matrix_base.h.
|
protectedinherited |
Array of sub-matrices.
Definition at line 850 of file block_matrix_base.h.
|
privateinherited |
A set of scratch arrays that can be used by the add() and set() functions that take pointers to data to pre-sort indices before use. Access from multiple threads is synchronized via the mutex variable that is part of the structure.
Definition at line 1062 of file block_matrix_base.h.
|
mutableprivateinherited |
Store the number of objects which subscribed to this object. Initially, this number is zero, and upon destruction it shall be zero again (i.e. all objects which subscribed should have unsubscribed again).
The creator (and owner) of an object is counted in the map below if HE manages to supply identification.
We use the mutable keyword in order to allow subscription to constant objects also.
This counter may be read from and written to concurrently in multithreaded code: hence we use the std::atomic class template.
Definition at line 212 of file enable_observer_pointer.h.
|
mutableprivateinherited |
In this map, we count subscriptions for each different identification string supplied to subscribe().
Definition at line 218 of file enable_observer_pointer.h.
|
mutableprivateinherited |
In this vector, we store pointers to the validity bool in the ObserverPointer objects that subscribe to this class.
Definition at line 224 of file enable_observer_pointer.h.
|
mutableprivateinherited |
Pointer to the typeinfo object of this object, from which we can later deduce the class name. Since this information on the derived class is neither available in the destructor, nor in the constructor, we obtain it in between and store it here.
Definition at line 232 of file enable_observer_pointer.h.
|
staticprivateinherited |
A mutex used to ensure data consistency when accessing the mutable members of this class. This lock is used in the subscribe() and unsubscribe() functions, as well as in list_subscribers().
Definition at line 239 of file enable_observer_pointer.h.