Reference documentation for deal.II version GIT relicensing-487-ge9eb5ab491 2024-04-25 07:20:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, true > Class Template Reference

#include <deal.II/lac/trilinos_tpetra_sparse_matrix.h>

Inheritance diagram for LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, true >:
Inheritance graph
[legend]

Public Types

using MatrixType = const SparseMatrix< Number, MemorySpace >
 
using size_type = typename AccessorBase< Number, MemorySpace >::size_type
 

Public Member Functions

 Accessor (MatrixType *matrix, const size_type row, const size_type index)
 
template<bool Other>
 Accessor (const Accessor< Number, MemorySpace, Other > &a)
 
Number value () const
 
size_type row () const
 
size_type index () const
 
size_type column () const
 

Protected Member Functions

void visit_present_row ()
 

Protected Attributes

SparseMatrix< Number, MemorySpace > * matrix
 
size_type a_row
 
size_type a_index
 
std::shared_ptr< std::vector<::types::signed_global_dof_index > > colnum_cache
 
std::shared_ptr< std::vector< Number > > value_cache
 

Detailed Description

template<typename Number, typename MemorySpace>
class LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, true >

The specialization for a const Accessor.

Definition at line 1452 of file trilinos_tpetra_sparse_matrix.h.

Member Typedef Documentation

◆ MatrixType

template<typename Number , typename MemorySpace >
using LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, true >::MatrixType = const SparseMatrix<Number, MemorySpace>

Typedef for the type (including constness) of the matrix to be used here.

Definition at line 1460 of file trilinos_tpetra_sparse_matrix.h.

◆ size_type

template<typename Number , typename MemorySpace >
using LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, true >::size_type = typename AccessorBase<Number, MemorySpace>::size_type

Typedef for the size type of the matrix to be used here.

Definition at line 1465 of file trilinos_tpetra_sparse_matrix.h.

Constructor & Destructor Documentation

◆ Accessor() [1/2]

template<typename Number , typename MemorySpace >
LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, true >::Accessor ( MatrixType matrix,
const size_type  row,
const size_type  index 
)
inline

Constructor. Since we use accessors only for read access, a const matrix pointer is sufficient.

Definition at line 2133 of file trilinos_tpetra_sparse_matrix.h.

◆ Accessor() [2/2]

template<typename Number , typename MemorySpace >
template<bool Other>
LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, true >::Accessor ( const Accessor< Number, MemorySpace, Other > &  a)
inline

Copy constructor to get from a const or non-const accessor to a const accessor.

Definition at line 2147 of file trilinos_tpetra_sparse_matrix.h.

Member Function Documentation

◆ value()

template<typename Number , typename MemorySpace >
Number LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, true >::value ( ) const
inline

Value of this matrix entry.

Definition at line 2156 of file trilinos_tpetra_sparse_matrix.h.

◆ row()

template<typename Number , typename MemorySpace >
AccessorBase< Number, MemorySpace >::size_type LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::row ( ) const
inlineinherited

Row number of the element represented by this object.

Definition at line 2043 of file trilinos_tpetra_sparse_matrix.h.

◆ index()

template<typename Number , typename MemorySpace >
AccessorBase< Number, MemorySpace >::size_type LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::index ( ) const
inlineinherited

Index in row of the element represented by this object.

Definition at line 2061 of file trilinos_tpetra_sparse_matrix.h.

◆ column()

template<typename Number , typename MemorySpace >
AccessorBase< Number, MemorySpace >::size_type LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::column ( ) const
inlineinherited

Column number of the element represented by this object.

Definition at line 2052 of file trilinos_tpetra_sparse_matrix.h.

◆ visit_present_row()

template<typename Number , typename MemorySpace >
void LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::visit_present_row ( )
protectedinherited

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 2071 of file trilinos_tpetra_sparse_matrix.h.

Member Data Documentation

◆ matrix

template<typename Number , typename MemorySpace >
SparseMatrix<Number, MemorySpace>* LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::matrix
mutableprotectedinherited

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 1378 of file trilinos_tpetra_sparse_matrix.h.

◆ a_row

template<typename Number , typename MemorySpace >
size_type LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::a_row
protectedinherited

Current row number.

Definition at line 1382 of file trilinos_tpetra_sparse_matrix.h.

◆ a_index

template<typename Number , typename MemorySpace >
size_type LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::a_index
protectedinherited

Current index in row.

Definition at line 1387 of file trilinos_tpetra_sparse_matrix.h.

◆ colnum_cache

template<typename Number , typename MemorySpace >
std::shared_ptr<std::vector<::types::signed_global_dof_index> > LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::colnum_cache
protectedinherited

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 1410 of file trilinos_tpetra_sparse_matrix.h.

◆ value_cache

template<typename Number , typename MemorySpace >
std::shared_ptr<std::vector<Number> > LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::value_cache
protectedinherited

Cache for the values of this row.

Definition at line 1415 of file trilinos_tpetra_sparse_matrix.h.


The documentation for this class was generated from the following file: