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 | Static Public Member Functions | Private Attributes | Friends | List of all members
LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness > Class Template Reference

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

Public Types

using size_type = ::types::global_dof_index
 
using difference_type = ::types::global_dof_index
 
using value_type = Number
 
using MatrixType = typename Accessor< Number, MemorySpace, Constness >::MatrixType
 

Public Member Functions

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

Static Public Member Functions

static ::ExceptionBaseExcInvalidIndexWithinRow (size_type arg1, size_type arg2)
 

Private Attributes

Accessor< Number, MemorySpace, Constness > accessor
 

Friends

class Iterator< Number, MemorySpace, true >
 
class Iterator< Number, MemorySpace, false >
 

Detailed Description

template<typename Number, typename MemorySpace, bool Constness>
class LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, 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 1592 of file trilinos_tpetra_sparse_matrix.h.

Member Typedef Documentation

◆ size_type

template<typename Number , typename MemorySpace , bool Constness>
using LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::size_type = ::types::global_dof_index

Declare type for container size.

Definition at line 1598 of file trilinos_tpetra_sparse_matrix.h.

◆ difference_type

template<typename Number , typename MemorySpace , bool Constness>
using LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::difference_type = ::types::global_dof_index

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

Definition at line 1604 of file trilinos_tpetra_sparse_matrix.h.

◆ value_type

template<typename Number , typename MemorySpace , bool Constness>
using LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::value_type = Number

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

Definition at line 1610 of file trilinos_tpetra_sparse_matrix.h.

◆ MatrixType

template<typename Number , typename MemorySpace , bool Constness>
using LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::MatrixType = typename Accessor<Number, MemorySpace, Constness>::MatrixType

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

Definition at line 1616 of file trilinos_tpetra_sparse_matrix.h.

Constructor & Destructor Documentation

◆ Iterator() [1/2]

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

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

Definition at line 2273 of file trilinos_tpetra_sparse_matrix.h.

◆ Iterator() [2/2]

template<typename Number , typename MemorySpace , bool Constness>
template<bool Other>
LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::Iterator ( const Iterator< Number, MemorySpace, Other > &  other)
inline

Copy constructor with optional change of constness.

Definition at line 2283 of file trilinos_tpetra_sparse_matrix.h.

Member Function Documentation

◆ operator++() [1/2]

template<typename Number , typename MemorySpace , bool Constness>
Iterator< Number, MemorySpace, Constness > & LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::operator++ ( )
inline

Prefix increment.

Definition at line 2292 of file trilinos_tpetra_sparse_matrix.h.

◆ operator++() [2/2]

template<typename Number , typename MemorySpace , bool Constness>
Iterator< Number, MemorySpace, Constness > LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::operator++ ( int  )
inline

Postfix increment.

Definition at line 2321 of file trilinos_tpetra_sparse_matrix.h.

◆ operator*()

template<typename Number , typename MemorySpace , bool Constness>
const Accessor< Number, MemorySpace, Constness > & LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::operator* ( ) const
inline

Dereferencing operator.

Definition at line 2332 of file trilinos_tpetra_sparse_matrix.h.

◆ operator->()

template<typename Number , typename MemorySpace , bool Constness>
const Accessor< Number, MemorySpace, Constness > * LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::operator-> ( ) const
inline

Dereferencing operator.

Definition at line 2341 of file trilinos_tpetra_sparse_matrix.h.

◆ operator==()

template<typename Number , typename MemorySpace , bool Constness>
template<bool OtherConstness>
bool LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::operator== ( const Iterator< Number, MemorySpace, OtherConstness > &  other) const
inline

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

Definition at line 2351 of file trilinos_tpetra_sparse_matrix.h.

◆ operator!=()

template<typename Number , typename MemorySpace , bool Constness>
template<bool OtherConstness>
bool LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::operator!= ( const Iterator< Number, MemorySpace, OtherConstness > &  other) const
inline

Inverse of ==.

Definition at line 2363 of file trilinos_tpetra_sparse_matrix.h.

◆ operator<()

template<typename Number , typename MemorySpace , bool Constness>
template<bool OtherConstness>
bool LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::operator< ( const Iterator< Number, MemorySpace, OtherConstness > &  other) const
inline

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.

Definition at line 2373 of file trilinos_tpetra_sparse_matrix.h.

◆ operator>()

template<typename Number , typename MemorySpace , bool Constness>
template<bool OtherConstness>
bool LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::operator> ( const Iterator< Number, MemorySpace, OtherConstness > &  other) const
inline

Comparison operator. The opposite of the previous operator

Definition at line 2386 of file trilinos_tpetra_sparse_matrix.h.

Friends And Related Symbol Documentation

◆ Iterator< Number, MemorySpace, true >

template<typename Number , typename MemorySpace , bool Constness>
friend class Iterator< Number, MemorySpace, true >
friend

Definition at line 1701 of file trilinos_tpetra_sparse_matrix.h.

◆ Iterator< Number, MemorySpace, false >

template<typename Number , typename MemorySpace , bool Constness>
friend class Iterator< Number, MemorySpace, false >
friend

Definition at line 1701 of file trilinos_tpetra_sparse_matrix.h.

Member Data Documentation

◆ accessor

template<typename Number , typename MemorySpace , bool Constness>
Accessor<Number, MemorySpace, Constness> LinearAlgebra::TpetraWrappers::SparseMatrixIterators::Iterator< Number, MemorySpace, Constness >::accessor
private

Store an object of the accessor class.

Definition at line 1701 of file trilinos_tpetra_sparse_matrix.h.


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