![]() |
Reference documentation for deal.II version 9.6.2
|
#include <deal.II/lac/trilinos_sparse_matrix.h>
Public Types | |
using | MatrixType = const SparseMatrix |
using | size_type |
Public Member Functions | |
Accessor (MatrixType *matrix, const size_type row, const size_type index) | |
template<bool Other> | |
Accessor (const Accessor< Other > &a) | |
TrilinosScalar | value () const |
size_type | row () const |
size_type | index () const |
size_type | column () const |
Protected Member Functions | |
void | visit_present_row () |
Protected Attributes | |
SparseMatrix * | matrix |
size_type | a_row |
size_type | a_index |
std::shared_ptr< std::vector< size_type > > | colnum_cache |
std::shared_ptr< std::vector< TrilinosScalar > > | value_cache |
Friends | |
template<bool> | |
class | Iterator |
The specialization for a const Accessor.
Definition at line 218 of file trilinos_sparse_matrix.h.
using TrilinosWrappers::SparseMatrixIterators::Accessor< true >::MatrixType = const SparseMatrix |
Typedef for the type (including constness) of the matrix to be used here.
Definition at line 225 of file trilinos_sparse_matrix.h.
Declare the type for container size.
Definition at line 113 of file trilinos_sparse_matrix.h.
TrilinosWrappers::SparseMatrixIterators::Accessor< true >::Accessor | ( | MatrixType * | matrix, |
const size_type | row, | ||
const size_type | index ) |
Constructor. Since we use accessors only for read access, a const matrix pointer is sufficient.
TrilinosWrappers::SparseMatrixIterators::Accessor< true >::Accessor | ( | const Accessor< Other > & | a | ) |
Copy constructor to get from a const or non-const accessor to a const accessor.
TrilinosScalar TrilinosWrappers::SparseMatrixIterators::Accessor< true >::value | ( | ) | const |
Value of this matrix entry.
size_type TrilinosWrappers::SparseMatrixIterators::AccessorBase::row | ( | ) | const |
Row number of the element represented by this object.
size_type TrilinosWrappers::SparseMatrixIterators::AccessorBase::index | ( | ) | const |
Index in row of the element represented by this object.
size_type TrilinosWrappers::SparseMatrixIterators::AccessorBase::column | ( | ) | const |
Column number of the element represented by this object.
|
protected |
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 164 of file trilinos_sparse_matrix.cc.
Definition at line 249 of file trilinos_sparse_matrix.h.
|
mutableprotected |
Pointer to the matrix object. This object should be handled as a const pointer or non-const by the appropriate derived classes. In order to be able to implement both, it is not const here, so handle with care!
Definition at line 147 of file trilinos_sparse_matrix.h.
|
protected |
Current row number.
Definition at line 151 of file trilinos_sparse_matrix.h.
|
protected |
Current index in row.
Definition at line 156 of file trilinos_sparse_matrix.h.
|
protected |
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 178 of file trilinos_sparse_matrix.h.
|
protected |
Cache for the values of this row.
Definition at line 183 of file trilinos_sparse_matrix.h.