deal.II version GIT relicensing-2167-g9622207b8f 2024-11-21 12:40:00+00:00
|
#include <deal.II/lac/trilinos_sparsity_pattern.h>
Public Types | |
using | size_type = ::types::global_dof_index |
Public Member Functions | |
Accessor (const SparsityPattern *sparsity_pattern, const size_type row, const size_type index) | |
size_type | row () const |
size_type | index () const |
size_type | column () const |
Static Public Member Functions | |
static ::ExceptionBase & | ExcBeyondEndOfSparsityPattern () |
static ::ExceptionBase & | ExcAccessToNonlocalRow (size_type arg1, size_type arg2, size_type arg3) |
Private Member Functions | |
void | visit_present_row () |
Private Attributes | |
SparsityPattern * | sparsity_pattern |
size_type | a_row |
size_type | a_index |
std::shared_ptr< const std::vector< size_type > > | colnum_cache |
Friends | |
class | Iterator |
Accessor class for iterators into sparsity patterns. This class is also the base class for both const and non-const accessor classes into sparse matrices.
Note that this class only allows read access to elements, providing their row and column number. It does not allow modifying the sparsity pattern itself.
Definition at line 73 of file trilinos_sparsity_pattern.h.
Declare type for container size.
Definition at line 79 of file trilinos_sparsity_pattern.h.
TrilinosWrappers::SparsityPatternIterators::Accessor::Accessor | ( | const SparsityPattern * | sparsity_pattern, |
const size_type | row, | ||
const size_type | index | ||
) |
Constructor.
size_type TrilinosWrappers::SparsityPatternIterators::Accessor::row | ( | ) | const |
Row number of the element represented by this object.
size_type TrilinosWrappers::SparsityPatternIterators::Accessor::index | ( | ) | const |
Index in row of the element represented by this object.
size_type TrilinosWrappers::SparsityPatternIterators::Accessor::column | ( | ) | const |
Column number of the element represented by this object.
|
private |
Discard the old row caches (they may still be used by other accessors) and generate new ones for the row pointed to presently by this accessor.
Definition at line 37 of file trilinos_sparsity_pattern.cc.
|
friend |
Definition at line 162 of file trilinos_sparsity_pattern.h.
|
private |
The matrix accessed.
Definition at line 127 of file trilinos_sparsity_pattern.h.
|
private |
Current row number.
Definition at line 132 of file trilinos_sparsity_pattern.h.
|
private |
Current index in row.
Definition at line 137 of file trilinos_sparsity_pattern.h.
|
private |
Cache where we store the column indices of the present row. This is necessary, since Trilinos makes access to the elements of its matrices rather hard, and it is much more efficient to copy all column entries of a row once when we enter it than repeatedly asking Trilinos for individual ones. This also makes some sense since it is likely that we will access them sequentially anyway.
In order to make copying of iterators/accessor of acceptable performance, we keep a shared pointer to these entries so that more than one accessor can access this data if necessary.
Definition at line 151 of file trilinos_sparsity_pattern.h.