PSCF v1.1
|
Iterator over points in a Mesh<D>. More...
#include <MeshIterator.h>
Public Member Functions | |
MeshIterator () | |
Default constructor. More... | |
MeshIterator (const IntVec< D > &dimensions) | |
Constructor. More... | |
void | setDimensions (const IntVec< D > &dimensions) |
Set the grid dimensions in all directions. More... | |
void | begin () |
Set iterator to the first point in the mesh. More... | |
void | operator++ () |
Increment iterator to next mesh point. More... | |
bool | atEnd () const |
Is this the end (i.e., one past the last point)? More... | |
IntVec< D > | position () const |
Get current position in the grid, as integer vector. More... | |
int | position (int i) const |
Get component i of the current position vector. More... | |
int | rank () const |
Get the rank of current element. More... | |
Iterator over points in a Mesh<D>.
A mesh iterator iterates over the points of a mesh, keeping track of both the IntVec<D> position and integer rank of the current point as it goes.
Definition at line 28 of file MeshIterator.h.
Pscf::MeshIterator< D >::MeshIterator |
Default constructor.
Definition at line 20 of file MeshIterator.tpp.
Pscf::MeshIterator< D >::MeshIterator | ( | const IntVec< D > & | dimensions | ) |
Constructor.
dimensions | IntVec<D> of grid dimensions |
Definition at line 31 of file MeshIterator.tpp.
References Pscf::MeshIterator< D >::setDimensions().
void Pscf::MeshIterator< D >::setDimensions | ( | const IntVec< D > & | dimensions | ) |
Set the grid dimensions in all directions.
dimensions | IntVec<D> of grid dimensions. |
Definition at line 42 of file MeshIterator.tpp.
References UTIL_THROW.
Referenced by Pscf::MeshIterator< D >::MeshIterator().
void Pscf::MeshIterator< D >::begin |
Set iterator to the first point in the mesh.
Definition at line 61 of file MeshIterator.tpp.
Referenced by Pscf::Pspg::WaveList< D >::computeMinimumImages(), Pscf::Basis< D >::isValid(), Pscf::Pspc::FieldIo< D >::readFieldRGrid(), Pscf::Pspc::FieldIo< D >::readFieldsKGrid(), Pscf::Pspc::FieldIo< D >::readFieldsRGrid(), Pscf::Pspc::FieldIo< D >::writeFieldRGrid(), Pscf::Pspc::FieldIo< D >::writeFieldsKGrid(), and Pscf::Pspc::FieldIo< D >::writeFieldsRGrid().
|
inline |
Increment iterator to next mesh point.
Definition at line 76 of file MeshIterator.tpp.
|
inline |
Is this the end (i.e., one past the last point)?
Definition at line 141 of file MeshIterator.h.
Referenced by Pscf::Pspg::WaveList< D >::computeMinimumImages(), Pscf::Basis< D >::isValid(), Pscf::Pspc::FieldIo< D >::readFieldRGrid(), Pscf::Pspc::FieldIo< D >::readFieldsKGrid(), Pscf::Pspc::FieldIo< D >::readFieldsRGrid(), Pscf::Pspc::FieldIo< D >::writeFieldRGrid(), Pscf::Pspc::FieldIo< D >::writeFieldsKGrid(), and Pscf::Pspc::FieldIo< D >::writeFieldsRGrid().
|
inline |
Get current position in the grid, as integer vector.
Definition at line 122 of file MeshIterator.h.
Referenced by Pscf::Pspg::WaveList< D >::computeMinimumImages(), and Pscf::Basis< D >::isValid().
|
inline |
Get component i of the current position vector.
i | index of Cartesian direction 0 <=i < D. |
Definition at line 127 of file MeshIterator.h.
|
inline |
Get the rank of current element.
Definition at line 136 of file MeshIterator.h.
Referenced by Pscf::Pspg::WaveList< D >::computeMinimumImages(), Pscf::Pspc::FieldIo< D >::readFieldRGrid(), Pscf::Pspc::FieldIo< D >::readFieldsKGrid(), Pscf::Pspc::FieldIo< D >::readFieldsRGrid(), Pscf::Pspc::FieldIo< D >::writeFieldRGrid(), Pscf::Pspc::FieldIo< D >::writeFieldsKGrid(), and Pscf::Pspc::FieldIo< D >::writeFieldsRGrid().