Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MeshImplElemIter Class Reference

ElementIterator for MeshImpl. More...

#include <MeshImplData.hpp>

Inheritance diagram for MeshImplElemIter:
Collaboration diagram for MeshImplElemIter:

Public Member Functions

 MeshImplElemIter (MeshImplData *data)
 
virtual ~MeshImplElemIter ()
 
virtual void restart ()
 Moves the iterator back to the first entity in the list. More...
 
virtual void operator++ ()
 ++iterator More...
 
virtual Mesh::ElementHandle operator* () const
 *iterator. More...
 
virtual bool is_at_end () const
 Returns false until the iterator has been advanced PAST the last entity. More...
 
 MeshImplElemIter (MeshImplData *data)
 
virtual ~MeshImplElemIter ()
 
virtual void restart ()
 Moves the iterator back to the first entity in the list. More...
 
virtual void operator++ ()
 ++iterator More...
 
virtual Mesh::ElementHandle operator* () const
 *iterator. More...
 
virtual bool is_at_end () const
 Returns false until the iterator has been advanced PAST the last entity. More...
 
- Public Member Functions inherited from EntityIterator
virtual ~EntityIterator ()
 

Private Attributes

MeshImplDatamesh
 
size_t index
 

Detailed Description

ElementIterator for MeshImpl.

Iterate over valid element indices

Definition at line 273 of file includeLinks/MeshImplData.hpp.

Constructor & Destructor Documentation

MeshImplElemIter ( MeshImplData data)
inline

Definition at line 281 of file includeLinks/MeshImplData.hpp.

References MeshImplElemIter::restart().

282  : mesh(data) { restart(); }
virtual void restart()
Moves the iterator back to the first entity in the list.

Here is the call graph for this function:

~MeshImplElemIter ( )
virtual

Definition at line 734 of file Mesh/MeshImplData.cpp.

735  {}
MeshImplElemIter ( MeshImplData data)
inline

Definition at line 281 of file src/Mesh/MeshImplData.hpp.

References MeshImplElemIter::restart().

282  : mesh(data) { restart(); }
virtual void restart()
Moves the iterator back to the first entity in the list.

Here is the call graph for this function:

virtual ~MeshImplElemIter ( )
virtual

Member Function Documentation

bool is_at_end ( ) const
virtual

Returns false until the iterator has been advanced PAST the last entity.

Once is_at_end() returns true, *iterator returns 0.

Implements EntityIterator.

Definition at line 756 of file Mesh/MeshImplData.cpp.

References MeshImplElemIter::index, MeshImplData::max_element_index(), and MeshImplElemIter::mesh.

Here is the call graph for this function:

virtual bool is_at_end ( ) const
virtual

Returns false until the iterator has been advanced PAST the last entity.

Once is_at_end() returns true, *iterator returns 0.

Implements EntityIterator.

Mesh::ElementHandle operator* ( ) const
virtual

*iterator.

Return the handle currently being pointed at by the iterator.

Implements EntityIterator.

Definition at line 751 of file Mesh/MeshImplData.cpp.

References MeshImplElemIter::index.

752 {
753  return reinterpret_cast<Mesh::ElementHandle>(index);
754 }
EntityHandle ElementHandle
virtual Mesh::ElementHandle operator* ( ) const
virtual

*iterator.

Return the handle currently being pointed at by the iterator.

Implements EntityIterator.

void operator++ ( )
virtual

++iterator

Implements EntityIterator.

Definition at line 744 of file Mesh/MeshImplData.cpp.

References MeshImplElemIter::index, MeshImplData::is_element_valid(), and MeshImplElemIter::mesh.

745 {
746  ++index;
747  while (index < mesh->max_element_index() && !mesh->is_element_valid(index))
748  ++index;
749 }
bool is_element_valid(size_t index) const
Check if passed element index is valid.

Here is the call graph for this function:

virtual void operator++ ( )
virtual

++iterator

Implements EntityIterator.

void restart ( )
virtual

Moves the iterator back to the first entity in the list.

Implements EntityIterator.

Definition at line 737 of file Mesh/MeshImplData.cpp.

References MeshImplElemIter::index, MeshImplData::is_element_valid(), and MeshImplElemIter::mesh.

Referenced by MeshImplElemIter::MeshImplElemIter().

738 {
739  index = 0;
740  if (!mesh->is_element_valid( index ))
741  operator++();
742 }
bool is_element_valid(size_t index) const
Check if passed element index is valid.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void restart ( )
virtual

Moves the iterator back to the first entity in the list.

Implements EntityIterator.

Member Data Documentation


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