Advanced Multi-Physics (AMP)
On-Line Documentation
Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
AMP::Mesh::structuredMeshIterator Class Referencefinal

#include <structuredMeshIterator.h>

Inheritance diagram for AMP::Mesh::structuredMeshIterator:
Inheritance graph
[legend]

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

MeshIterator begin () const override
 Return an iterator to the begining.
 
std::string className () const override
 Return the class name.
 
std::unique_ptr< MeshIteratorBaseclone () const override
 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)
 
BoxMesh::MeshElementIndex getCurrentIndex () const
 
std::shared_ptr< const std::vector< BoxMesh::MeshElementIndex > > getElements () const
 
uint64_t getID () const
 Return a unique hash id.
 
bool operator!= (const MeshIteratorBase &rhs) const override
 Check if two iterators are not equal.
 
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 MeshElementoperator* () const
 Dereference the iterator.
 
MeshIteratorBaseoperator++ () override
 Increment.
 
MeshIteratorBaseoperator+= (int N) override
 
MeshIteratorBaseoperator-- () override
 Decrement.
 
const MeshElementoperator-> () const
 Dereference the iterator.
 
structuredMeshIteratoroperator= (const structuredMeshIterator &)
 Assignment operator.
 
structuredMeshIteratoroperator= (structuredMeshIterator &&)=delete
 Move operator.
 
bool operator== (const MeshIteratorBase &rhs) const override
 Check if two iterators are equal.
 
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.
 
void registerChildObjects (AMP::IO::RestartManager *manager) const override
 
void setPos (size_t) override
 Set the position in the iterator.
 
size_t size () const
 Return the number of elements in the iterator.
 
 structuredMeshIterator ()
 Empty structuredMeshIterator constructor.
 
 structuredMeshIterator (const BoxMesh::MeshElementIndex &first, const BoxMesh::MeshElementIndex &last, const AMP::Mesh::BoxMesh *mesh, size_t pos=0)
 Range base constructor.
 
 structuredMeshIterator (const BoxMesh::MeshElementIndexIterator &it, const AMP::Mesh::BoxMesh *mesh, size_t pos=0)
 Range base constructor.
 
 structuredMeshIterator (const structuredMeshIterator &)
 Copy constructor.
 
 structuredMeshIterator (int64_t fid, AMP::IO::RestartManager *manager)
 
 structuredMeshIterator (std::shared_ptr< const std::vector< BoxMesh::MeshElementIndex > > elements, const AMP::Mesh::BoxMesh *mesh, size_t pos=0)
 Element list constructor.
 
 structuredMeshIterator (structuredMeshIterator &&)=delete
 Move constructor.
 
Type type () const
 Return the iterator type.
 
void writeRestart (int64_t fid) const override
 
virtual ~structuredMeshIterator ()
 Deconstructor.
 

Protected Attributes

const MeshElementd_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.
 

Private Attributes

structuredMeshElement d_cur_element
 
std::shared_ptr< const std::vector< BoxMesh::MeshElementIndex > > d_elements
 
BoxMesh::MeshElementIndexIterator d_it
 
const AMP::Mesh::BoxMeshd_mesh
 

Detailed Description

Definition at line 15 of file structuredMeshIterator.h.

Member Typedef Documentation

◆ difference_type

using AMP::Mesh::MeshIteratorBase::difference_type = ptrdiff_t
inherited

Definition at line 45 of file MeshIterator.h.

◆ iterator_category

using AMP::Mesh::MeshIteratorBase::iterator_category = std::random_access_iterator_tag
inherited

Definition at line 43 of file MeshIterator.h.

◆ pointer

Definition at line 46 of file MeshIterator.h.

◆ reference

Definition at line 47 of file MeshIterator.h.

◆ value_type

Definition at line 44 of file MeshIterator.h.

Member Enumeration Documentation

◆ Type

enum class AMP::Mesh::MeshIteratorBase::Type : uint8_t
stronginherited

Enum for the type of iterator supported.

Enumerator
Forward 
Bidirectional 
RandomAccess 

Definition at line 52 of file MeshIterator.h.

Constructor & Destructor Documentation

◆ structuredMeshIterator() [1/7]

AMP::Mesh::structuredMeshIterator::structuredMeshIterator ( )

Empty structuredMeshIterator constructor.

◆ structuredMeshIterator() [2/7]

AMP::Mesh::structuredMeshIterator::structuredMeshIterator ( const BoxMesh::MeshElementIndex first,
const BoxMesh::MeshElementIndex last,
const AMP::Mesh::BoxMesh mesh,
size_t  pos = 0 
)

Range base constructor.

◆ structuredMeshIterator() [3/7]

AMP::Mesh::structuredMeshIterator::structuredMeshIterator ( const BoxMesh::MeshElementIndexIterator it,
const AMP::Mesh::BoxMesh mesh,
size_t  pos = 0 
)

Range base constructor.

◆ structuredMeshIterator() [4/7]

AMP::Mesh::structuredMeshIterator::structuredMeshIterator ( std::shared_ptr< const std::vector< BoxMesh::MeshElementIndex > >  elements,
const AMP::Mesh::BoxMesh mesh,
size_t  pos = 0 
)

Element list constructor.

◆ ~structuredMeshIterator()

virtual AMP::Mesh::structuredMeshIterator::~structuredMeshIterator ( )
virtual

Deconstructor.

◆ structuredMeshIterator() [5/7]

AMP::Mesh::structuredMeshIterator::structuredMeshIterator ( structuredMeshIterator &&  )
delete

Move constructor.

◆ structuredMeshIterator() [6/7]

AMP::Mesh::structuredMeshIterator::structuredMeshIterator ( const structuredMeshIterator )

Copy constructor.

◆ structuredMeshIterator() [7/7]

AMP::Mesh::structuredMeshIterator::structuredMeshIterator ( int64_t  fid,
AMP::IO::RestartManager manager 
)

Member Function Documentation

◆ begin()

MeshIterator AMP::Mesh::structuredMeshIterator::begin ( ) const
overridevirtual

Return an iterator to the begining.

Implements AMP::Mesh::MeshIteratorBase.

◆ className()

std::string AMP::Mesh::structuredMeshIterator::className ( ) const
inlineoverridevirtual

Return the class name.

Implements AMP::Mesh::MeshIteratorBase.

Definition at line 54 of file structuredMeshIterator.h.

◆ clone()

std::unique_ptr< MeshIteratorBase > AMP::Mesh::structuredMeshIterator::clone ( ) const
overridevirtual

Clone the iterator.

Implements AMP::Mesh::MeshIteratorBase.

◆ empty()

size_t AMP::Mesh::MeshIteratorBase::empty ( ) const
inlineinherited

Return the number of elements in the iterator.

Definition at line 63 of file MeshIterator.h.

References AMP::Mesh::MeshIteratorBase::d_size.

◆ end()

MeshIteratorEnd AMP::Mesh::MeshIteratorBase::end ( ) const
inlineinherited

Return an iterator to the end (use tombstone class)

Definition at line 78 of file MeshIterator.h.

◆ getCurrentIndex()

BoxMesh::MeshElementIndex AMP::Mesh::structuredMeshIterator::getCurrentIndex ( ) const

◆ getElements()

std::shared_ptr< const std::vector< BoxMesh::MeshElementIndex > > AMP::Mesh::structuredMeshIterator::getElements ( ) const

◆ getID()

uint64_t AMP::Mesh::MeshIteratorBase::getID ( ) const
inlineinherited

Return a unique hash id.

Definition at line 60 of file MeshIterator.h.

References AMP::Mesh::MeshIteratorBase::d_typeHash.

◆ operator!=() [1/3]

bool AMP::Mesh::structuredMeshIterator::operator!= ( const MeshIteratorBase rhs) const
overridevirtual

Check if two iterators are not equal.

Implements AMP::Mesh::MeshIteratorBase.

◆ operator!=() [2/3]

virtual bool AMP::Mesh::MeshIteratorBase::operator!= ( const MeshIteratorBase rhs) const
virtual

Check if two iterators are not equal.

Implements AMP::Mesh::MeshIteratorBase.

◆ operator!=() [3/3]

bool AMP::Mesh::MeshIteratorBase::operator!= ( MeshIteratorEnd  ) const
inline

Check if two iterators are not equal.

Definition at line 84 of file MeshIterator.h.

◆ operator*()

const MeshElement & AMP::Mesh::MeshIteratorBase::operator* ( ) const
inlineinherited

Dereference the iterator.

Definition at line 75 of file MeshIterator.h.

References AMP::Mesh::MeshIteratorBase::d_element.

◆ operator++()

MeshIteratorBase & AMP::Mesh::structuredMeshIterator::operator++ ( )
overridevirtual

Increment.

Implements AMP::Mesh::MeshIteratorBase.

◆ operator+=()

MeshIteratorBase & AMP::Mesh::structuredMeshIterator::operator+= ( int  N)
overridevirtual

◆ operator--()

MeshIteratorBase & AMP::Mesh::structuredMeshIterator::operator-- ( )
overridevirtual

Decrement.

Implements AMP::Mesh::MeshIteratorBase.

◆ operator->()

const MeshElement * AMP::Mesh::MeshIteratorBase::operator-> ( ) const
inlineinherited

Dereference the iterator.

Definition at line 72 of file MeshIterator.h.

References AMP::Mesh::MeshIteratorBase::d_element.

◆ operator=() [1/2]

structuredMeshIterator & AMP::Mesh::structuredMeshIterator::operator= ( const structuredMeshIterator )

Assignment operator.

◆ operator=() [2/2]

structuredMeshIterator & AMP::Mesh::structuredMeshIterator::operator= ( structuredMeshIterator &&  )
delete

Move operator.

◆ operator==() [1/3]

bool AMP::Mesh::structuredMeshIterator::operator== ( const MeshIteratorBase rhs) const
overridevirtual

Check if two iterators are equal.

Implements AMP::Mesh::MeshIteratorBase.

◆ operator==() [2/3]

virtual bool AMP::Mesh::MeshIteratorBase::operator== ( const MeshIteratorBase rhs) const
virtual

Check if two iterators are equal.

Implements AMP::Mesh::MeshIteratorBase.

◆ operator==() [3/3]

bool AMP::Mesh::MeshIteratorBase::operator== ( MeshIteratorEnd  ) const
inline

Check if two iterators are equal.

Definition at line 81 of file MeshIterator.h.

◆ pos()

size_t AMP::Mesh::MeshIteratorBase::pos ( ) const
inlineinherited

Return the current position (from the beginning) in the iterator.

Definition at line 69 of file MeshIterator.h.

References AMP::Mesh::MeshIteratorBase::d_pos.

◆ registerChildObjects()

void AMP::Mesh::structuredMeshIterator::registerChildObjects ( AMP::IO::RestartManager manager) const
overridevirtual

◆ setPos()

void AMP::Mesh::structuredMeshIterator::setPos ( size_t  )
overridevirtual

Set the position in the iterator.

Implements AMP::Mesh::MeshIteratorBase.

◆ size()

size_t AMP::Mesh::MeshIteratorBase::size ( ) const
inlineinherited

Return the number of elements in the iterator.

Definition at line 66 of file MeshIterator.h.

References AMP::Mesh::MeshIteratorBase::d_size.

◆ type()

Type AMP::Mesh::MeshIteratorBase::type ( ) const
inlineinherited

Return the iterator type.

Definition at line 57 of file MeshIterator.h.

References AMP::Mesh::MeshIteratorBase::d_iteratorType.

◆ writeRestart()

void AMP::Mesh::structuredMeshIterator::writeRestart ( int64_t  fid) const
overridevirtual

Member Data Documentation

◆ d_cur_element

structuredMeshElement AMP::Mesh::structuredMeshIterator::d_cur_element
mutableprivate

Definition at line 103 of file structuredMeshIterator.h.

◆ d_element

const MeshElement* AMP::Mesh::MeshIteratorBase::d_element = nullptr
protectedinherited

Pointer to the current element.

Definition at line 137 of file MeshIterator.h.

Referenced by AMP::Mesh::MeshIteratorBase::operator*(), and AMP::Mesh::MeshIteratorBase::operator->().

◆ d_elements

std::shared_ptr<const std::vector<BoxMesh::MeshElementIndex> > AMP::Mesh::structuredMeshIterator::d_elements
private

Definition at line 101 of file structuredMeshIterator.h.

◆ d_it

BoxMesh::MeshElementIndexIterator AMP::Mesh::structuredMeshIterator::d_it
private

Definition at line 100 of file structuredMeshIterator.h.

◆ d_iteratorType

Type AMP::Mesh::MeshIteratorBase::d_iteratorType = Type::RandomAccess
protectedinherited

Type of iterator.

Definition at line 133 of file MeshIterator.h.

Referenced by AMP::Mesh::MeshIteratorBase::type().

◆ d_mesh

const AMP::Mesh::BoxMesh* AMP::Mesh::structuredMeshIterator::d_mesh
private

Definition at line 102 of file structuredMeshIterator.h.

◆ d_pos

size_t AMP::Mesh::MeshIteratorBase::d_pos = 0
protectedinherited

◆ d_size

size_t AMP::Mesh::MeshIteratorBase::d_size = 0
protectedinherited

◆ d_typeHash

uint32_t AMP::Mesh::MeshIteratorBase::d_typeHash = 0
protectedinherited

Unique hash for the type.

Definition at line 134 of file MeshIterator.h.

Referenced by AMP::Mesh::MeshIteratorBase::getID().


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



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:43.
Comments on this page