Reference documentation for deal.II version 9.3.3
\(\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\}}\)
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members

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

Public Types

using size_type = ::types::global_dof_index
 

Public Member Functions

 Accessor (const SparsityPattern *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 ::ExceptionBaseExcBeyondEndOfSparsityPattern ()
 
static ::ExceptionBaseExcAccessToNonlocalRow (size_type arg1, size_type arg2, size_type arg3)
 

Private Member Functions

void visit_present_row ()
 

Private Attributes

SparsityPatternsparsity_pattern
 
size_type a_row
 
size_type a_index
 
std::shared_ptr< const std::vector< size_type > > colnum_cache
 

Friends

class Iterator
 

Detailed Description

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 77 of file trilinos_sparsity_pattern.h.

Member Typedef Documentation

◆ size_type

Declare type for container size.

Definition at line 83 of file trilinos_sparsity_pattern.h.

Constructor & Destructor Documentation

◆ Accessor()

TrilinosWrappers::SparsityPatternIterators::Accessor::Accessor ( const SparsityPattern sparsity_pattern,
const size_type  row,
const size_type  index 
)

Constructor.

Member Function Documentation

◆ row()

size_type TrilinosWrappers::SparsityPatternIterators::Accessor::row ( ) const

Row number of the element represented by this object.

◆ index()

size_type TrilinosWrappers::SparsityPatternIterators::Accessor::index ( ) const

Index in row of the element represented by this object.

◆ column()

size_type TrilinosWrappers::SparsityPatternIterators::Accessor::column ( ) const

Column number of the element represented by this object.

◆ visit_present_row()

void TrilinosWrappers::SparsityPatternIterators::Accessor::visit_present_row ( )
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 36 of file trilinos_sparsity_pattern.cc.

Friends And Related Function Documentation

◆ Iterator

friend class Iterator
friend

Definition at line 166 of file trilinos_sparsity_pattern.h.

Member Data Documentation

◆ sparsity_pattern

SparsityPattern* TrilinosWrappers::SparsityPatternIterators::Accessor::sparsity_pattern
mutableprivate

The matrix accessed.

Definition at line 131 of file trilinos_sparsity_pattern.h.

◆ a_row

size_type TrilinosWrappers::SparsityPatternIterators::Accessor::a_row
private

Current row number.

Definition at line 136 of file trilinos_sparsity_pattern.h.

◆ a_index

size_type TrilinosWrappers::SparsityPatternIterators::Accessor::a_index
private

Current index in row.

Definition at line 141 of file trilinos_sparsity_pattern.h.

◆ colnum_cache

std::shared_ptr<const std::vector<size_type> > TrilinosWrappers::SparsityPatternIterators::Accessor::colnum_cache
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 155 of file trilinos_sparsity_pattern.h.


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