1#ifndef included_AMP_structuredMeshIterators
2#define included_AMP_structuredMeshIterators
4#include "AMP/mesh/MeshIterator.h"
5#include "AMP/mesh/structured/BoxMesh.h"
6#include "AMP/mesh/structured/structuredMeshElement.h"
54 std::string
className()
const override {
return "structuredMeshIterator"; }
78 std::unique_ptr<MeshIteratorBase>
clone()
const override;
80 using MeshIteratorBase::operator==;
81 using MeshIteratorBase::operator!=;
92 std::shared_ptr<const std::vector<BoxMesh::MeshElementIndex>>
getElements()
const;
101 std::shared_ptr<const std::vector<BoxMesh::MeshElementIndex>>
d_elements;
Class to manage reading/writing restart data.
Structure to uniquely identify an element.
A class used to represent a logically rectangular box mesh.
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.
bool operator==(const MeshIteratorBase &rhs) const override
Check if two iterators are equal.
std::shared_ptr< const std::vector< BoxMesh::MeshElementIndex > > d_elements
std::string className() const override
Return the class name.
structuredMeshIterator(const structuredMeshIterator &)
Copy constructor.
BoxMesh::MeshElementIndex getCurrentIndex() const
void registerChildObjects(AMP::IO::RestartManager *manager) const override
std::unique_ptr< MeshIteratorBase > clone() const override
Clone the iterator.
void writeRestart(int64_t fid) const override
MeshIteratorBase & operator++() override
Increment.
MeshIteratorBase & operator+=(int N) override
structuredMeshIterator(structuredMeshIterator &&)=delete
Move constructor.
structuredMeshIterator & operator=(structuredMeshIterator &&)=delete
Move operator.
MeshIteratorBase & operator--() override
Decrement.
MeshIterator begin() const override
Return an iterator to the begining.
const AMP::Mesh::BoxMesh * d_mesh
structuredMeshIterator()
Empty structuredMeshIterator constructor.
BoxMesh::MeshElementIndexIterator d_it
virtual ~structuredMeshIterator()
Deconstructor.
structuredMeshIterator(const BoxMesh::MeshElementIndex &first, const BoxMesh::MeshElementIndex &last, const AMP::Mesh::BoxMesh *mesh, size_t pos=0)
Range base constructor.
structuredMeshIterator(int64_t fid, AMP::IO::RestartManager *manager)
bool operator!=(const MeshIteratorBase &rhs) const override
Check if two iterators are not equal.
structuredMeshIterator(const BoxMesh::MeshElementIndexIterator &it, const AMP::Mesh::BoxMesh *mesh, size_t pos=0)
Range base constructor.
structuredMeshIterator(std::shared_ptr< const std::vector< BoxMesh::MeshElementIndex > > elements, const AMP::Mesh::BoxMesh *mesh, size_t pos=0)
Element list constructor.
structuredMeshElement d_cur_element
std::shared_ptr< const std::vector< BoxMesh::MeshElementIndex > > getElements() const
void setPos(size_t) override
Set the position in the iterator.
structuredMeshIterator & operator=(const structuredMeshIterator &)
Assignment operator.