Advanced Multi-Physics (AMP)
On-Line Documentation
TriangleMeshIterator.h
Go to the documentation of this file.
1#ifndef included_AMP_TriangleMeshIterators
2#define included_AMP_TriangleMeshIterators
3
4
5#include "AMP/mesh/MeshIterator.h"
6#include "AMP/mesh/triangle/TriangleMeshElement.h"
7
8
9namespace AMP::Mesh {
10
11
12template<uint8_t NG>
13class TriangleMesh;
14
15
16template<uint8_t NG>
18{
19public:
22
29 std::shared_ptr<const std::vector<ElementID>> list,
30 size_t pos = 0 );
31
33 virtual ~TriangleMeshIterator() = default;
34
37
40
42 std::string className() const override;
43
45 void setPos( size_t ) override;
46
47 // Increment
49
50 // Decrement
52
53 // Arithmetic operator+=
54 MeshIteratorBase &operator+=( int N ) override;
55
56 // Check if two iterators are equal
57 bool operator==( const MeshIteratorBase &rhs ) const override;
58
59 // Check if two iterators are not equal
60 bool operator!=( const MeshIteratorBase &rhs ) const override;
61
62 // Return an iterator to the begining
63 MeshIterator begin() const override;
64
66 auto getList() const { return d_list; }
67
69 std::unique_ptr<MeshIteratorBase> clone() const override;
70
71 using MeshIteratorBase::operator==;
72 using MeshIteratorBase::operator!=;
73
74
75public: // Write/read restart data
77 void writeRestart( int64_t ) const override;
79
80
81protected:
82 // Data members
84 std::shared_ptr<const std::vector<ElementID>> d_list;
86};
87
88
89} // namespace AMP::Mesh
90
91#endif
Class to manage reading/writing restart data.
A base class used to iterate over elements in a Mesh.
size_t pos() const
Return the current position (from the beginning) in the iterator.
A class used to iterate over elements in a Mesh.
A derived class used to define a mesh element.
TriangleMeshIterator & operator=(const TriangleMeshIterator &)
Assignment operator.
TriangleMeshIterator()
Empty MeshIterator constructor.
MeshIteratorBase & operator--() override
void registerChildObjects(AMP::IO::RestartManager *) const override
TriangleMeshIterator(const TriangleMeshIterator &)
Copy constructor.
MeshIteratorBase & operator++() override
const AMP::Mesh::TriangleMesh< NG > * d_mesh
TriangleMeshElement< NG > d_cur_element
MeshIteratorBase & operator+=(int N) override
MeshIterator begin() const override
Return an iterator to the beginning.
bool operator!=(const MeshIteratorBase &rhs) const override
Check if two iterators are not equal.
std::unique_ptr< MeshIteratorBase > clone() const override
Clone the iterator.
bool operator==(const MeshIteratorBase &rhs) const override
Check if two iterators are equal.
void setPos(size_t) override
Set the position in the iterator.
void writeRestart(int64_t) const override
TriangleMeshIterator(int64_t, AMP::IO::RestartManager *)
TriangleMeshIterator(const AMP::Mesh::TriangleMesh< NG > *mesh, std::shared_ptr< const std::vector< ElementID > > list, size_t pos=0)
virtual ~TriangleMeshIterator()=default
Deconstructor.
std::shared_ptr< const std::vector< ElementID > > d_list
std::string className() const override
Return the class name.
auto getList() const
Access the list of elements.
A class used to represent an unstructured mesh of Triangles/Tetrahedrals.



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:41.
Comments on this page