libMesh
Public Member Functions | Private Attributes | List of all members
libMesh::ConstCouplingRowConstIterator Class Reference

#include <coupling_matrix.h>

Public Member Functions

 ConstCouplingRowConstIterator (const ConstCouplingRow &row_in, std::size_t loc_in, CouplingMatrix::rc_type::const_iterator it_in)
 
unsigned int operator* ()
 
ConstCouplingRowConstIteratoroperator++ ()
 
bool operator== (const ConstCouplingRowConstIterator &other) const
 
bool operator!= (const ConstCouplingRowConstIterator &other) const
 

Private Attributes

std::size_t _location
 
const ConstCouplingRow_row
 
CouplingMatrix::rc_type::const_iterator _it
 

Detailed Description

Definition at line 449 of file coupling_matrix.h.

Constructor & Destructor Documentation

libMesh::ConstCouplingRowConstIterator::ConstCouplingRowConstIterator ( const ConstCouplingRow row_in,
std::size_t  loc_in,
CouplingMatrix::rc_type::const_iterator  it_in 
)

Definition at line 452 of file coupling_matrix.h.

References std::max().

454  :
455  _location(loc_in),
456  _row(row_in),
457  _it(it_in)
458  {
459 #ifndef NDEBUG
460  if (_it != _row._mat._ranges.end())
461  {
462  libmesh_assert_less_equal(_it->first, _location);
463  libmesh_assert_less_equal(_location, _it->second);
464  }
465  else
466  {
467  libmesh_assert_equal_to
469  }
470 #endif
471  }
long double max(long double a, double b)
CouplingMatrix::rc_type::const_iterator _it
const CouplingMatrix & _mat

Member Function Documentation

bool libMesh::ConstCouplingRowConstIterator::operator!= ( const ConstCouplingRowConstIterator other) const

Definition at line 519 of file coupling_matrix.h.

520  {
521  return !(*this == other);
522  }
unsigned int libMesh::ConstCouplingRowConstIterator::operator* ( )

Definition at line 473 of file coupling_matrix.h.

References std::max().

474  {
475  libmesh_assert_not_equal_to
477  return _location % _row._mat.size();
478  }
long double max(long double a, double b)
unsigned int size() const
const CouplingMatrix & _mat
ConstCouplingRowConstIterator& libMesh::ConstCouplingRowConstIterator::operator++ ( )

Definition at line 480 of file coupling_matrix.h.

References std::max().

481  {
482  libmesh_assert_not_equal_to
484 
485  if (_location == _it->second)
486  {
487  ++_it;
488 
489  // Are we past the end of the matrix?
490  if (_it == _row._mat._ranges.end())
492  else
493  {
494  _location = _it->first;
495  // Are we past the end of the row?
496  if (_location >= _row._mat.size()*(_row._row_i+1))
497  {
499  _it = _row._mat._ranges.end();
500  }
501  }
502  }
503  else
504  ++_location;
505 
506  return *this;
507  }
long double max(long double a, double b)
CouplingMatrix::rc_type::const_iterator _it
unsigned int size() const
const CouplingMatrix & _mat
bool libMesh::ConstCouplingRowConstIterator::operator== ( const ConstCouplingRowConstIterator other) const

Definition at line 509 of file coupling_matrix.h.

References _it, _location, _row, and libMesh::libmesh_assert().

510  {
511  // Thinking that iterators from different row objects are equal
512  // is not even wrong
513  libmesh_assert(_row == other._row);
514 
515  return ((_location == other._location) &&
516  (_it == other._it));
517  }
libmesh_assert(j)
CouplingMatrix::rc_type::const_iterator _it

Member Data Documentation

CouplingMatrix::rc_type::const_iterator libMesh::ConstCouplingRowConstIterator::_it
private

Definition at line 531 of file coupling_matrix.h.

Referenced by operator==().

std::size_t libMesh::ConstCouplingRowConstIterator::_location
private

Definition at line 527 of file coupling_matrix.h.

Referenced by operator==().

const ConstCouplingRow& libMesh::ConstCouplingRowConstIterator::_row
private

Definition at line 528 of file coupling_matrix.h.

Referenced by operator==().


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