A base 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 & |
| enum class | Type : uint8_t { Forward = 1 , Bidirectional = 2 , RandomAccess = 3 } |
| Enum for the type of iterator supported. More... | |
| using | value_type = AMP::Mesh::MeshElement |
Public Member Functions | |
| virtual MeshIterator | begin () const =0 |
| Return an iterator to the beginning. | |
| virtual std::string | className () const =0 |
| Return the class name. | |
| virtual std::unique_ptr< MeshIteratorBase > | clone () const =0 |
| Clone the iterator. | |
| size_t | empty () const |
| Return the number of elements in the iterator. | |
| MeshIteratorEnd | end () const |
| Return an iterator to the end (use tombstone class) | |
| uint64_t | getID () const |
| Return a unique hash id. | |
| MeshIteratorBase (int64_t, AMP::IO::RestartManager *) | |
| virtual bool | operator!= (const MeshIteratorBase &rhs) const =0 |
| Check if two iterators are not equal. | |
| bool | operator!= (MeshIteratorEnd) const |
| Check if two iterators are not equal. | |
| const MeshElement & | operator* () const |
| Dereference the iterator. | |
| virtual MeshIteratorBase & | operator++ ()=0 |
| virtual MeshIteratorBase & | operator+= (int N)=0 |
| virtual MeshIteratorBase & | operator-- ()=0 |
| const MeshElement * | operator-> () const |
| Dereference the iterator. | |
| virtual bool | operator== (const MeshIteratorBase &rhs) const =0 |
| Check if two iterators are equal. | |
| bool | operator== (MeshIteratorEnd) const |
| Check if two iterators are equal. | |
| size_t | pos () const |
| Return the current position (from the beginning) in the iterator. | |
| virtual void | registerChildObjects (AMP::IO::RestartManager *) const =0 |
| virtual void | setPos (size_t)=0 |
| 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. | |
| virtual void | writeRestart (int64_t) const =0 |
| virtual | ~MeshIteratorBase ()=default |
| Virtual destructor. | |
Protected Member Functions | |
| MeshIteratorBase ()=default | |
| MeshIteratorBase (const MeshIteratorBase &)=delete | |
| MeshIteratorBase (MeshIteratorBase &&)=delete | |
| MeshIteratorBase & | operator= (const MeshIteratorBase &)=delete |
| MeshIteratorBase & | operator= (MeshIteratorBase &&)=delete |
Protected Attributes | |
| const MeshElement * | d_element = nullptr |
| Pointer to the current element. | |
| Type | d_iteratorType = Type::RandomAccess |
| Type of iterator. | |
| size_t | d_pos = 0 |
| Position of the iterator. | |
| size_t | d_size = 0 |
| Size of the iterator. | |
| uint32_t | d_typeHash = 0 |
| Unique hash for the type. | |
A base 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. The base class provides routines for the random access iterators, but does so using the increment/decrement routines. Derived classes may (or may not) override these routines for performance optimizations.
Definition at line 40 of file MeshIterator.h.
| using AMP::Mesh::MeshIteratorBase::difference_type = ptrdiff_t |
Definition at line 45 of file MeshIterator.h.
| using AMP::Mesh::MeshIteratorBase::iterator_category = std::random_access_iterator_tag |
Definition at line 43 of file MeshIterator.h.
| using AMP::Mesh::MeshIteratorBase::pointer = const AMP::Mesh::MeshElement * |
Definition at line 46 of file MeshIterator.h.
| using AMP::Mesh::MeshIteratorBase::reference = const AMP::Mesh::MeshElement & |
Definition at line 47 of file MeshIterator.h.
Definition at line 44 of file MeshIterator.h.
|
strong |
Enum for the type of iterator supported.
| Enumerator | |
|---|---|
| Forward | |
| Bidirectional | |
| RandomAccess | |
Definition at line 52 of file MeshIterator.h.
|
virtualdefault |
Virtual destructor.
| AMP::Mesh::MeshIteratorBase::MeshIteratorBase | ( | int64_t | , |
| AMP::IO::RestartManager * | |||
| ) |
|
protecteddefault |
|
protecteddelete |
|
protecteddelete |
|
pure virtual |
Return an iterator to the beginning.
Implemented in AMP::Mesh::libmeshElemIterator, AMP::Mesh::libmeshNodeIterator, AMP::Mesh::MeshListIterator< TYPE >, AMP::Mesh::MultiIterator, AMP::Mesh::structuredMeshIterator, and AMP::Mesh::TriangleMeshIterator< NG >.
|
pure virtual |
Return the class name.
Implemented in AMP::Mesh::libmeshElemIterator, AMP::Mesh::libmeshNodeIterator, AMP::Mesh::MeshListIterator< TYPE >, AMP::Mesh::MultiIterator, AMP::Mesh::structuredMeshIterator, and AMP::Mesh::TriangleMeshIterator< NG >.
|
pure virtual |
Clone the iterator.
Implemented in AMP::Mesh::libmeshElemIterator, AMP::Mesh::libmeshNodeIterator, AMP::Mesh::MeshListIterator< TYPE >, AMP::Mesh::MultiIterator, AMP::Mesh::structuredMeshIterator, and AMP::Mesh::TriangleMeshIterator< NG >.
|
inline |
Return the number of elements in the iterator.
Definition at line 63 of file MeshIterator.h.
References d_size.
|
inline |
Return an iterator to the end (use tombstone class)
Definition at line 78 of file MeshIterator.h.
|
inline |
|
pure virtual |
Check if two iterators are not equal.
Implemented in AMP::Mesh::libmeshElemIterator, AMP::Mesh::libmeshNodeIterator, AMP::Mesh::MeshListIterator< TYPE >, AMP::Mesh::MultiIterator, AMP::Mesh::structuredMeshIterator, AMP::Mesh::TriangleMeshIterator< NG >, AMP::Mesh::libmeshElemIterator, AMP::Mesh::libmeshNodeIterator, AMP::Mesh::MeshListIterator< TYPE >, AMP::Mesh::MultiIterator, AMP::Mesh::structuredMeshIterator, and AMP::Mesh::TriangleMeshIterator< NG >.
|
inline |
Check if two iterators are not equal.
Definition at line 84 of file MeshIterator.h.
|
inline |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
|
protecteddelete |
|
protecteddelete |
|
pure virtual |
Check if two iterators are equal.
Implemented in AMP::Mesh::libmeshElemIterator, AMP::Mesh::libmeshNodeIterator, AMP::Mesh::MeshListIterator< TYPE >, AMP::Mesh::MultiIterator, AMP::Mesh::structuredMeshIterator, AMP::Mesh::TriangleMeshIterator< NG >, AMP::Mesh::libmeshElemIterator, AMP::Mesh::libmeshNodeIterator, AMP::Mesh::MeshListIterator< TYPE >, AMP::Mesh::MultiIterator, AMP::Mesh::structuredMeshIterator, and AMP::Mesh::TriangleMeshIterator< NG >.
|
inline |
Check if two iterators are equal.
Definition at line 81 of file MeshIterator.h.
|
inline |
Return the current position (from the beginning) in the iterator.
Definition at line 69 of file MeshIterator.h.
References d_pos.
|
pure virtual |
|
pure virtual |
Set the position in the iterator.
Implemented in AMP::Mesh::libmeshElemIterator, AMP::Mesh::libmeshNodeIterator, AMP::Mesh::MeshListIterator< TYPE >, AMP::Mesh::MultiIterator, AMP::Mesh::structuredMeshIterator, and AMP::Mesh::TriangleMeshIterator< NG >.
|
inline |
Return the number of elements in the iterator.
Definition at line 66 of file MeshIterator.h.
References d_size.
|
inline |
|
pure virtual |
|
protected |
Pointer to the current element.
Definition at line 137 of file MeshIterator.h.
Referenced by operator*(), and operator->().
|
protected |
|
protected |
Position of the iterator.
Definition at line 136 of file MeshIterator.h.
Referenced by operator!=(), operator==(), and pos().
|
protected |
Size of the iterator.
Definition at line 135 of file MeshIterator.h.
Referenced by empty(), operator!=(), operator==(), and size().
|
protected |
|
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 |