A class used to iterate over elements in a Mesh. More...
#include <MeshIterator.h>
Public Types | |
| using | difference_type = ptrdiff_t |
| using | iterator_category = std::random_access_iterator_tag |
| using | pointer = const AMP::Mesh::MeshElement * |
| using | reference = const AMP::Mesh::MeshElement & |
| using | Type = MeshIteratorBase::Type |
| using | value_type = AMP::Mesh::MeshElement |
Public Member Functions | |
| MeshIterator | begin () const |
| Return an iterator to the beginning. | |
| std::string | className () const |
| Return the class name. | |
| bool | empty () const |
| Check if the iterator is empty. | |
| MeshIteratorEnd | end () const |
| Return an iterator to the end (use tombstone class) | |
| const MeshElement * | get () const |
| Dereference the iterator. | |
| uint64_t | getID () const |
| Return a unique hash id. | |
| MeshIterator () | |
| Empty MeshIterator constructor. | |
| MeshIterator (const MeshIterator &) | |
| Copy constructor. | |
| MeshIterator (int64_t fid) | |
| MeshIterator (MeshIterator &&) | |
| Move constructor. | |
| MeshIterator (MeshIteratorBase *p) | |
| Constructor that takes ownership of the raw pointer. | |
| MeshIterator (std::unique_ptr< MeshIteratorBase > &&p) | |
| Default constructor. | |
| bool | operator!= (const MeshIterator &rhs) const |
| Check if two iterators are not equal. | |
| bool | operator!= (const MeshIteratorBase &rhs) const |
| Check if two iterators are not equal. | |
| bool | operator!= (MeshIteratorEnd rhs) const |
| Check if two iterators are not equal. | |
| const MeshElement & | operator* () const |
| Dereference the iterator. | |
| MeshIterator | operator+ (const MeshIterator &it) const |
| Arithmetic operator+. | |
| MeshIterator | operator+ (int N) const |
| Arithmetic operator+. | |
| MeshIterator & | operator++ () |
| Pre-Increment. | |
| MeshIterator | operator++ (int) |
| Post-Increment. | |
| MeshIterator & | operator+= (const MeshIterator &it) |
| Arithmetic operator+=. | |
| MeshIterator & | operator+= (int N) |
| Arithmetic operator+=. | |
| MeshIterator | operator- (const MeshIterator &it) const |
| Arithmetic operator-. | |
| MeshIterator | operator- (int N) const |
| Arithmetic operator-. | |
| MeshIterator & | operator-- () |
| Pre-Decrement. | |
| MeshIterator | operator-- (int) |
| Post-Decrement. | |
| MeshIterator & | operator-= (const MeshIterator &it) |
| Arithmetic operator-=. | |
| MeshIterator & | operator-= (int N) |
| Arithmetic operator-=. | |
| const MeshElement * | operator-> () const |
| Dereference the iterator. | |
| bool | operator< (const MeshIterator &rhs) const |
| Operator <. | |
| bool | operator<= (const MeshIterator &rhs) const |
| Operator <=. | |
| MeshIterator & | operator= (const MeshIterator &) |
| Assignment operator. | |
| MeshIterator & | operator= (MeshIterator &&) |
| Move operator. | |
| MeshIterator & | operator= (std::unique_ptr< MeshIteratorBase > &&) |
| Assignment operator. | |
| bool | operator== (const MeshIterator &rhs) const |
| Check if two iterators are equal. | |
| bool | operator== (const MeshIteratorBase &rhs) const |
| Check if two iterators are equal. | |
| bool | operator== (MeshIteratorEnd rhs) const |
| Check if two iterators are equal. | |
| bool | operator> (const MeshIterator &rhs) const |
| Operator > | |
| bool | operator>= (const MeshIterator &rhs) const |
| Operator >=. | |
| size_t | pos () const |
| Return the current position (from the beginning) in the iterator. | |
| MeshIteratorBase * | rawIterator () |
| Return the raw iterator (may be this) | |
| const MeshIteratorBase * | rawIterator () const |
| Return the raw iterator (may be this) | |
| void | registerChildObjects (AMP::IO::RestartManager *manager) const |
| MeshIteratorBase * | release () |
| Return a pointer to the underlying and release ownership. | |
| void | setPos (size_t i) |
| Set the position in the iterator. | |
| size_t | size () const |
| Return the number of elements in the iterator. | |
| Type | type () const |
| Return the iterator type. | |
| void | writeRestart (int64_t fid) const |
| ~MeshIterator () | |
| Deconstructor. | |
Static Public Member Functions | |
| template<class T , typename... Args> | |
| static MeshIterator | create (Args... args) |
| Create a mesh iterator. | |
Protected Attributes | |
| MeshIteratorBase * | it = nullptr |
A class used to iterate over elements in a Mesh.
This class provides routines for iterating over a set of elements. It is inherited from std::iterator. This is a wrapper class that contains a pointer to the underlying iterator.
Definition at line 149 of file MeshIterator.h.
| using AMP::Mesh::MeshIterator::difference_type = ptrdiff_t |
Definition at line 154 of file MeshIterator.h.
| using AMP::Mesh::MeshIterator::iterator_category = std::random_access_iterator_tag |
Definition at line 152 of file MeshIterator.h.
| using AMP::Mesh::MeshIterator::pointer = const AMP::Mesh::MeshElement * |
Definition at line 155 of file MeshIterator.h.
| using AMP::Mesh::MeshIterator::reference = const AMP::Mesh::MeshElement & |
Definition at line 156 of file MeshIterator.h.
Definition at line 157 of file MeshIterator.h.
Definition at line 153 of file MeshIterator.h.
| AMP::Mesh::MeshIterator::MeshIterator | ( | ) |
Empty MeshIterator constructor.
Referenced by create().
|
inline |
Default constructor.
Definition at line 172 of file MeshIterator.h.
| AMP::Mesh::MeshIterator::MeshIterator | ( | MeshIterator && | ) |
Move constructor.
| AMP::Mesh::MeshIterator::MeshIterator | ( | const MeshIterator & | ) |
Copy constructor.
|
inline |
|
inline |
Constructor that takes ownership of the raw pointer.
Definition at line 385 of file MeshIterator.h.
| AMP::Mesh::MeshIterator::MeshIterator | ( | int64_t | fid | ) |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
Return an iterator to the end (use tombstone class)
Definition at line 199 of file MeshIterator.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| MeshIterator AMP::Mesh::MeshIterator::operator+ | ( | const MeshIterator & | it | ) | const |
Arithmetic operator+.
Random access increment to advance the iterator by the given iterator. Note: not all iterators support random access (libmesh). In this case, the pre-increment will be used instead and may reduce performance.
| it | Iterator to add |
| MeshIterator AMP::Mesh::MeshIterator::operator+ | ( | int | N | ) | const |
Arithmetic operator+.
Random access increment to advance the iterator by N. Note: not all iterators support random access (libmesh). In this case, the pre-increment will be used instead and may reduce performance. Note: the default behavior of all random access iterators will be to call this function so derived classes only need to impliment this function for improved performance.
| N | Number to increment by (may be negative) |
|
inline |
Pre-Increment.
Pre-Increment the mesh iterator and return the reference to the iterator. This should be the fastest way to increment the iterator.
Definition at line 206 of file MeshIterator.h.
References it.
| MeshIterator AMP::Mesh::MeshIterator::operator++ | ( | int | ) |
Post-Increment.
Post-Increment the mesh iterator and return a reference to a temporary iterator. This should be avoided and pre-increment used whenever possible.
| MeshIterator & AMP::Mesh::MeshIterator::operator+= | ( | const MeshIterator & | it | ) |
Arithmetic operator+=.
Random access increment to advance the iterator by the given iterator. Note: not all iterators support random access (libmesh). In this case, the pre-increment will be used instead and may reduce performance.
| it | Iterator to add |
|
inline |
Arithmetic operator+=.
Random access increment to advance the iterator by N. Note: not all iterators support random access (libmesh). In this case, the pre-increment will be used instead and may reduce performance. Note: the default behavior of all random access assignment iterators will be to call this function so derived classes only need to implement this function for improved performance.
| N | Number to increment by (may be negative) |
Definition at line 233 of file MeshIterator.h.
References it.
| MeshIterator AMP::Mesh::MeshIterator::operator- | ( | const MeshIterator & | it | ) | const |
Arithmetic operator-.
Random access decrement to reverse the iterator by the given iterator. Note: not all iterators support random access (libmesh). In this case, the pre-decrement will be used instead and may reduce performance.
| it | Iterator to subtract |
| MeshIterator AMP::Mesh::MeshIterator::operator- | ( | int | N | ) | const |
Arithmetic operator-.
Random access decrement to reverse the iterator by N. Note: not all iterators support random access (libmesh). In this case, the pre-decrement will be used instead and may reduce performance.
| N | Number to decrement by (may be negative) |
|
inline |
Pre-Decrement.
Pre-Decrement the mesh iterator and return the reference to the iterator. This should be the fastest way to decrement the iterator. Note: not all iterators support decrementing the iterator (libmesh).
Definition at line 218 of file MeshIterator.h.
References it.
| MeshIterator AMP::Mesh::MeshIterator::operator-- | ( | int | ) |
Post-Decrement.
Post-Decrement the mesh iterator and return a reference to a temporary iterator. This should be avoided and pre-decrement used whenever possible. Note: not all iterators support decrementing the iterator (libmesh).
| MeshIterator & AMP::Mesh::MeshIterator::operator-= | ( | const MeshIterator & | it | ) |
Arithmetic operator-=.
Random access decrement to reverse the iterator by the given iterator. Note: not all iterators support random access (libmesh). In this case, the pre-decrement will be used instead and may reduce performance.
| it | Iterator to subtract |
| MeshIterator & AMP::Mesh::MeshIterator::operator-= | ( | int | N | ) |
Arithmetic operator-=.
Random access decrement to reverse the iterator by N. Note: not all iterators support random access (libmesh). In this case, the pre-decrement will be used instead and may reduce performance.
| N | Number to decrement by (may be negative) |
|
inline |
|
inline |
|
inline |
| MeshIterator & AMP::Mesh::MeshIterator::operator= | ( | const MeshIterator & | ) |
Assignment operator.
| MeshIterator & AMP::Mesh::MeshIterator::operator= | ( | MeshIterator && | ) |
Move operator.
| MeshIterator & AMP::Mesh::MeshIterator::operator= | ( | std::unique_ptr< MeshIteratorBase > && | ) |
Assignment operator.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return the current position (from the beginning) in the iterator.
Definition at line 285 of file MeshIterator.h.
References it.
Referenced by operator<(), operator<=(), operator>(), and operator>=().
|
inline |
|
inline |
| void AMP::Mesh::MeshIterator::registerChildObjects | ( | AMP::IO::RestartManager * | manager | ) | const |
| MeshIteratorBase * AMP::Mesh::MeshIterator::release | ( | ) |
Return a pointer to the underlying and release ownership.
This function will return the raw pointer to the underlying iterator and release its ownership. It is up to the user to properly destroy the returned iterator. Note: This function invalidates *this and any future calls to this object may result in a dereferencing a null pointer. Return a pointer to the underlying and releases the ownership
|
inline |
|
inline |
Return the number of elements in the iterator.
Definition at line 282 of file MeshIterator.h.
References it.
|
inline |
| void AMP::Mesh::MeshIterator::writeRestart | ( | int64_t | fid | ) | const |
|
protected |
Definition at line 406 of file MeshIterator.h.
Referenced by begin(), className(), empty(), get(), getID(), operator!=(), operator!=(), operator!=(), operator*(), operator++(), operator+=(), operator--(), operator->(), operator==(), operator==(), operator==(), pos(), rawIterator(), rawIterator(), setPos(), size(), type(), and ~MeshIterator().
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:43. Comments on this page |