Reference documentation for deal.II version GIT relicensing-245-g36f19064f7 2024-03-29 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
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
PETScWrappers::MatrixIterators::const_iterator Class Reference

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

Classes

class  Accessor
 

Public Types

using size_type = types::global_dof_index
 

Public Member Functions

 const_iterator (const MatrixBase *matrix, const size_type row, const size_type index)
 
const_iteratoroperator++ ()
 
const_iterator operator++ (int)
 
const Accessoroperator* () const
 
const Accessoroperator-> () const
 
bool operator== (const const_iterator &) const
 
bool operator!= (const const_iterator &) const
 
bool operator< (const const_iterator &) const
 

Static Public Member Functions

static ::ExceptionBaseExcInvalidIndexWithinRow (int arg1, int arg2)
 

Private Attributes

Accessor accessor
 

Detailed Description

This class acts as an iterator walking over the elements of PETSc matrices. Since PETSc offers a uniform interface for all types of matrices, this iterator can be used to access both sparse and full matrices.

Note that PETSc does not give any guarantees as to the order of elements within each row. Note also that accessing the elements of a full matrix surprisingly only shows the nonzero elements of the matrix, not all elements.

Definition at line 66 of file petsc_matrix_base.h.

Member Typedef Documentation

◆ size_type

Declare type for container size.

Definition at line 179 of file petsc_matrix_base.h.

Constructor & Destructor Documentation

◆ const_iterator()

PETScWrappers::MatrixIterators::const_iterator::const_iterator ( const MatrixBase 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.

Member Function Documentation

◆ operator++() [1/2]

const_iterator & PETScWrappers::MatrixIterators::const_iterator::operator++ ( )

Prefix increment.

◆ operator++() [2/2]

const_iterator PETScWrappers::MatrixIterators::const_iterator::operator++ ( int  )

Postfix increment.

◆ operator*()

const Accessor & PETScWrappers::MatrixIterators::const_iterator::operator* ( ) const

Dereferencing operator.

◆ operator->()

const Accessor * PETScWrappers::MatrixIterators::const_iterator::operator-> ( ) const

Dereferencing operator.

◆ operator==()

bool PETScWrappers::MatrixIterators::const_iterator::operator== ( const const_iterator ) const

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

◆ operator!=()

bool PETScWrappers::MatrixIterators::const_iterator::operator!= ( const const_iterator ) const

Inverse of ==.

◆ operator<()

bool PETScWrappers::MatrixIterators::const_iterator::operator< ( const const_iterator ) 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.

Member Data Documentation

◆ accessor

Accessor PETScWrappers::MatrixIterators::const_iterator::accessor
private

Store an object of the accessor class.

Definition at line 246 of file petsc_matrix_base.h.


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