TrilinosWrappers::SparsityPatternIterators::const_iterator::Accessor Class Reference

List of all members.

Classes

class  ExcAccessToNonlocalRow
class  ExcBeyondEndOfSparsityPattern

Public Member Functions

 Accessor (const SparsityPattern *sparsity_pattern, const unsigned int row, const unsigned int index)
unsigned int row () const
unsigned int index () const
unsigned int column () const

Private Member Functions

void visit_present_row ()

Private Attributes

SparsityPatternsparsity_pattern
unsigned int a_row
unsigned int a_index
std_cxx1x::shared_ptr< const
std::vector< unsigned int > > 
colnum_cache

Friends

class const_iterator


Detailed Description

Accessor class for iterators

Constructor & Destructor Documentation

TrilinosWrappers::SparsityPatternIterators::const_iterator::Accessor::Accessor ( const SparsityPattern sparsity_pattern,
const unsigned int  row,
const unsigned int  index 
)

Constructor. Since we use accessors only for read access, a const matrix pointer is sufficient.


Member Function Documentation

unsigned int TrilinosWrappers::SparsityPatternIterators::const_iterator::Accessor::row (  )  const

Row number of the element represented by this object.

unsigned int TrilinosWrappers::SparsityPatternIterators::const_iterator::Accessor::index (  )  const

Index in row of the element represented by this object.

unsigned int TrilinosWrappers::SparsityPatternIterators::const_iterator::Accessor::column (  )  const

Column number of the element represented by this object.

void TrilinosWrappers::SparsityPatternIterators::const_iterator::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.


Friends And Related Function Documentation

friend class const_iterator [friend]

Make enclosing class a friend.


Member Data Documentation

The matrix accessed.

Current row number.

Current index in row.

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.


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

deal.II documentation generated on Sat Aug 15 16:52:56 2009 by doxygen 1.5.9