Reference documentation for deal.II version 9.6.2
 
\(\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
TrilinosWrappers::SparseMatrixIterators::Accessor< false >::Reference Class Reference
Inheritance diagram for TrilinosWrappers::SparseMatrixIterators::Accessor< false >::Reference:

Public Types

using size_type
 

Public Member Functions

 Reference (const Accessor< false > &accessor)
 
 operator TrilinosScalar () const
 
const Referenceoperator= (const TrilinosScalar n) const
 
const Referenceoperator+= (const TrilinosScalar n) const
 
const Referenceoperator-= (const TrilinosScalar n) const
 
const Referenceoperator*= (const TrilinosScalar n) const
 
const Referenceoperator/= (const TrilinosScalar n) const
 
size_type row () const
 
size_type index () const
 
size_type column () const
 

Protected Member Functions

void visit_present_row ()
 

Protected Attributes

SparseMatrixmatrix
 
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
 

Private Member Functions

TrilinosScalar value () const
 
TrilinosScalarvalue ()
 

Private Attributes

Accessoraccessor
 

Detailed Description

Definition at line 258 of file trilinos_sparse_matrix.h.

Member Typedef Documentation

◆ size_type

Declare the type for container size.

Definition at line 113 of file trilinos_sparse_matrix.h.

Constructor & Destructor Documentation

◆ Reference()

TrilinosWrappers::SparseMatrixIterators::Accessor< false >::Reference::Reference ( const Accessor< false > & accessor)

Constructor.

Member Function Documentation

◆ operator TrilinosScalar()

TrilinosWrappers::SparseMatrixIterators::Accessor< false >::Reference::operator TrilinosScalar ( ) const

Conversion operator to the data type of the matrix.

◆ operator=()

const Reference & TrilinosWrappers::SparseMatrixIterators::Accessor< false >::Reference::operator= ( const TrilinosScalar n) const

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

◆ operator+=()

const Reference & TrilinosWrappers::SparseMatrixIterators::Accessor< false >::Reference::operator+= ( const TrilinosScalar n) const

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

◆ operator-=()

const Reference & TrilinosWrappers::SparseMatrixIterators::Accessor< false >::Reference::operator-= ( const TrilinosScalar n) const

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

◆ operator*=()

const Reference & TrilinosWrappers::SparseMatrixIterators::Accessor< false >::Reference::operator*= ( const TrilinosScalar n) const

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

◆ operator/=()

const Reference & TrilinosWrappers::SparseMatrixIterators::Accessor< false >::Reference::operator/= ( const TrilinosScalar n) const

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

◆ value() [1/2]

Value of this matrix entry.

◆ value() [2/2]

Value of this matrix entry.

◆ row()

size_type TrilinosWrappers::SparseMatrixIterators::AccessorBase::row ( ) const

Row number of the element represented by this object.

◆ index()

size_type TrilinosWrappers::SparseMatrixIterators::AccessorBase::index ( ) const

Index in row of the element represented by this object.

◆ column()

size_type TrilinosWrappers::SparseMatrixIterators::AccessorBase::column ( ) const

Column number of the element represented by this object.

◆ visit_present_row()

void TrilinosWrappers::SparseMatrixIterators::AccessorBase::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 164 of file trilinos_sparse_matrix.cc.

Member Data Documentation

◆ accessor

Accessor& TrilinosWrappers::SparseMatrixIterators::Accessor< false >::Reference::accessor
private

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

Definition at line 306 of file trilinos_sparse_matrix.h.

◆ matrix

SparseMatrix* TrilinosWrappers::SparseMatrixIterators::AccessorBase::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 147 of file trilinos_sparse_matrix.h.

◆ a_row

size_type TrilinosWrappers::SparseMatrixIterators::AccessorBase::a_row
protected

Current row number.

Definition at line 151 of file trilinos_sparse_matrix.h.

◆ a_index

size_type TrilinosWrappers::SparseMatrixIterators::AccessorBase::a_index
protected

Current index in row.

Definition at line 156 of file trilinos_sparse_matrix.h.

◆ colnum_cache

std::shared_ptr<std::vector<size_type> > TrilinosWrappers::SparseMatrixIterators::AccessorBase::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 178 of file trilinos_sparse_matrix.h.

◆ value_cache

std::shared_ptr<std::vector<TrilinosScalar> > TrilinosWrappers::SparseMatrixIterators::AccessorBase::value_cache
protected

Cache for the values of this row.

Definition at line 183 of file trilinos_sparse_matrix.h.


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