Reference documentation for deal.II version 9.6.1
 
\(\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
LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, false >::Reference Class Reference
Inheritance diagram for LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, false >::Reference:

Public Types

using size_type
 

Public Member Functions

 Reference (const Accessor< Number, MemorySpace, false > &accessor)
 
 operator Number () const
 
const Referenceoperator= (const Number n) const
 
const Referenceoperator+= (const Number n) const
 
const Referenceoperator-= (const Number n) const
 
const Referenceoperator*= (const Number n) const
 
const Referenceoperator/= (const Number n) 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
 

Private Member Functions

Number value () const
 
Number & value ()
 

Private Attributes

Accessoraccessor
 

Detailed Description

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

Definition at line 1456 of file trilinos_tpetra_sparse_matrix.h.

Member Typedef Documentation

◆ size_type

Declare the type for container size.

Definition at line 1304 of file trilinos_tpetra_sparse_matrix.h.

Constructor & Destructor Documentation

◆ Reference()

template<typename Number, typename MemorySpace>
LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, false >::Reference::Reference ( const Accessor< Number, MemorySpace, false > & accessor)
inline

Constructor.

Definition at line 2112 of file trilinos_tpetra_sparse_matrix.h.

Member Function Documentation

◆ operator Number()

template<typename Number, typename MemorySpace>
LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, false >::Reference::operator Number ( ) const
inline

Conversion operator to the data type of the matrix.

Definition at line 2120 of file trilinos_tpetra_sparse_matrix.h.

◆ operator=()

template<typename Number, typename MemorySpace>
const Accessor< Number, MemorySpace, false >::Reference & LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, false >::Reference::operator= ( const Number n) const
inline

Set the element of the matrix we presently point to to n.

Definition at line 2130 of file trilinos_tpetra_sparse_matrix.h.

◆ operator+=()

template<typename Number, typename MemorySpace>
const Accessor< Number, MemorySpace, false >::Reference & LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, false >::Reference::operator+= ( const Number n) const
inline

Add n to the element of the matrix we presently point to.

Definition at line 2144 of file trilinos_tpetra_sparse_matrix.h.

◆ operator-=()

template<typename Number, typename MemorySpace>
const Accessor< Number, MemorySpace, false >::Reference & LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, false >::Reference::operator-= ( const Number n) const
inline

Subtract n from the element of the matrix we presently point to.

Definition at line 2158 of file trilinos_tpetra_sparse_matrix.h.

◆ operator*=()

template<typename Number, typename MemorySpace>
const Accessor< Number, MemorySpace, false >::Reference & LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, false >::Reference::operator*= ( const Number n) const
inline

Multiply the element of the matrix we presently point to by n.

Definition at line 2171 of file trilinos_tpetra_sparse_matrix.h.

◆ operator/=()

template<typename Number, typename MemorySpace>
const Accessor< Number, MemorySpace, false >::Reference & LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, false >::Reference::operator/= ( const Number n) const
inline

Divide the element of the matrix we presently point to by n.

Definition at line 2184 of file trilinos_tpetra_sparse_matrix.h.

◆ value() [1/2]

Number LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, Constness >::value ( ) const
private

Value of this matrix entry.

◆ value() [2/2]

Number & LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, Constness >::value ( )
private

Value of this matrix entry.

◆ row()

AccessorBase< Number, MemorySpace >::size_type LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::row ( ) const
inline

Row number of the element represented by this object.

Definition at line 1317 of file trilinos_tpetra_sparse_matrix.h.

◆ index()

AccessorBase< Number, MemorySpace >::size_type LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::index ( ) const
inline

Index in row of the element represented by this object.

Definition at line 1323 of file trilinos_tpetra_sparse_matrix.h.

◆ column()

AccessorBase< Number, MemorySpace >::size_type LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::column ( ) const
inline

Column number of the element represented by this object.

Definition at line 1329 of file trilinos_tpetra_sparse_matrix.h.

◆ visit_present_row()

void LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::visit_present_row ( )
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 1355 of file trilinos_tpetra_sparse_matrix.h.

Member Data Documentation

◆ accessor

template<typename Number, typename MemorySpace>
Accessor& LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Accessor< Number, MemorySpace, false >::Reference::accessor
private

Pointer to the accessor that denotes which element we presently point to.

Definition at line 1504 of file trilinos_tpetra_sparse_matrix.h.

◆ matrix

SparseMatrix<Number, MemorySpace>* LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::matrix
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 1338 of file trilinos_tpetra_sparse_matrix.h.

◆ a_row

Current row number.

Definition at line 1342 of file trilinos_tpetra_sparse_matrix.h.

◆ a_index

Current index in row.

Definition at line 1347 of file trilinos_tpetra_sparse_matrix.h.

◆ colnum_cache

std::shared_ptr<std::vector<::types::signed_global_dof_index> > LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::colnum_cache
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 1370 of file trilinos_tpetra_sparse_matrix.h.

◆ value_cache

std::shared_ptr<std::vector<Number> > LinearAlgebra::TpetraWrappers::SparseMatrixIterators::AccessorBase< Number, MemorySpace >::value_cache
protected

Cache for the values of this row.

Definition at line 1375 of file trilinos_tpetra_sparse_matrix.h.


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