deal.II version GIT relicensing-2289-g1e5549a87a 2024-12-21 21:30:00+00:00
|
#include <deal.II/lac/trilinos_tpetra_sparsity_pattern.h>
Public Types | |
using | size_type = ::types::global_dof_index |
Public Member Functions | |
Accessor (const SparsityPattern< MemorySpace > *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< MemorySpace > * | sparsity_pattern |
size_type | a_row |
size_type | a_index |
std::shared_ptr< std::vector<::types::signed_global_dof_index > > | colnum_cache |
Friends | |
class | Iterator< MemorySpace > |
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 84 of file trilinos_tpetra_sparsity_pattern.h.
using LinearAlgebra::TpetraWrappers::SparsityPatternIterators::Accessor< MemorySpace >::size_type = ::types::global_dof_index |
Declare type for container size.
Definition at line 90 of file trilinos_tpetra_sparsity_pattern.h.
LinearAlgebra::TpetraWrappers::SparsityPatternIterators::Accessor< MemorySpace >::Accessor | ( | const SparsityPattern< MemorySpace > * | sparsity_pattern, |
const size_type | row, | ||
const size_type | index | ||
) |
Constructor.
size_type LinearAlgebra::TpetraWrappers::SparsityPatternIterators::Accessor< MemorySpace >::row | ( | ) | const |
Row number of the element represented by this object.
size_type LinearAlgebra::TpetraWrappers::SparsityPatternIterators::Accessor< MemorySpace >::index | ( | ) | const |
Index in row of the element represented by this object.
size_type LinearAlgebra::TpetraWrappers::SparsityPatternIterators::Accessor< MemorySpace >::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 40 of file trilinos_tpetra_sparsity_pattern.cc.
|
friend |
Definition at line 171 of file trilinos_tpetra_sparsity_pattern.h.
|
private |
The matrix accessed.
Definition at line 138 of file trilinos_tpetra_sparsity_pattern.h.
|
private |
Current row number.
Definition at line 143 of file trilinos_tpetra_sparsity_pattern.h.
|
private |
Current index in row.
Definition at line 148 of file trilinos_tpetra_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 163 of file trilinos_tpetra_sparsity_pattern.h.