Reference documentation for deal.II version GIT relicensing-660-g9ae06c0eb4 2024-05-17 13:10: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 | Static Public Member Functions | Private Attributes | Friends | List of all members
TrilinosWrappers::SparseMatrixIterators::Iterator< Constness > Class Template Reference

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

Public Types

using size_type = ::types::global_dof_index
 
using difference_type = ::types::global_dof_index
 
using value_type = TrilinosScalar
 
using MatrixType = typename Accessor< Constness >::MatrixType
 

Public Member Functions

 Iterator (MatrixType *matrix, const size_type row, const size_type index)
 
template<bool Other>
 Iterator (const Iterator< Other > &other)
 
Iterator< Constness > & operator++ ()
 
Iterator< Constnessoperator++ (int)
 
const Accessor< Constness > & operator* () const
 
const Accessor< Constness > * operator-> () const
 
template<bool OtherConstness>
bool operator== (const Iterator< OtherConstness > &) const
 
template<bool OtherConstness>
bool operator!= (const Iterator< OtherConstness > &) const
 
template<bool OtherConstness>
bool operator< (const Iterator< OtherConstness > &) const
 
template<bool OtherConstness>
bool operator> (const Iterator< OtherConstness > &) const
 

Static Public Member Functions

static ::ExceptionBaseExcInvalidIndexWithinRow (size_type arg1, size_type arg2)
 

Private Attributes

Accessor< Constnessaccessor
 

Friends

template<bool Other>
class Iterator
 

Detailed Description

template<bool Constness>
class TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >

This class acts as an iterator walking over the elements of Trilinos matrices. The implementation of this class is similar to the one for PETSc matrices.

Note that Trilinos stores the elements within each row in ascending order. This is opposed to the deal.II sparse matrix style where the diagonal element (if it exists) is stored before all other values, and the PETSc sparse matrices, where one can't guarantee a certain order of the elements.

Definition at line 351 of file trilinos_sparse_matrix.h.

Member Typedef Documentation

◆ size_type

Declare type for container size.

Definition at line 357 of file trilinos_sparse_matrix.h.

◆ difference_type

A type that denotes what data types is used to express the difference between two iterators.

Definition at line 363 of file trilinos_sparse_matrix.h.

◆ value_type

An alias for the type you get when you dereference an iterator of the current kind.

Definition at line 369 of file trilinos_sparse_matrix.h.

◆ MatrixType

Typedef for the matrix type (including constness) we are to operate on.

Definition at line 375 of file trilinos_sparse_matrix.h.

Constructor & Destructor Documentation

◆ Iterator() [1/2]

template<bool Constness>
TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::Iterator ( MatrixType matrix,
const size_type  row,
const size_type  index 
)

Constructor. Create an iterator into the matrix matrix for the given row and the index within it.

◆ Iterator() [2/2]

template<bool Constness>
template<bool Other>
TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::Iterator ( const Iterator< Other > &  other)

Copy constructor with optional change of constness.

Member Function Documentation

◆ operator++() [1/2]

Prefix increment.

◆ operator++() [2/2]

Postfix increment.

◆ operator*()

Dereferencing operator.

◆ operator->()

Dereferencing operator.

◆ operator==()

template<bool Constness>
template<bool OtherConstness>
bool TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::operator== ( const Iterator< OtherConstness > &  ) const

Comparison. True, if both iterators point to the same matrix position.

◆ operator!=()

template<bool Constness>
template<bool OtherConstness>
bool TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::operator!= ( const Iterator< OtherConstness > &  ) const

Inverse of ==.

◆ operator<()

template<bool Constness>
template<bool OtherConstness>
bool TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::operator< ( const Iterator< OtherConstness > &  ) const

Comparison operator. Result is true if either the first row number is smaller or if the row numbers are equal and the first index is smaller.

◆ operator>()

template<bool Constness>
template<bool OtherConstness>
bool TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::operator> ( const Iterator< OtherConstness > &  ) const

Comparison operator. The opposite of the previous operator

Friends And Related Symbol Documentation

◆ Iterator

template<bool Constness>
template<bool Other>
friend class Iterator
friend

Definition at line 460 of file trilinos_sparse_matrix.h.

Member Data Documentation

◆ accessor

Store an object of the accessor class.

Definition at line 457 of file trilinos_sparse_matrix.h.


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