Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator Class Reference

#include <AbstractTetrahedralMesh.hpp>

+ Collaboration diagram for AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator:

Public Member Functions

Element< ELEMENT_DIM, SPACE_DIM > & operator* ()
 
Element< ELEMENT_DIM, SPACE_DIM > * operator-> ()
 
bool operator!= (const typename AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator &rOther)
 
ElementIteratoroperator++ ()
 
 ElementIterator (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, typename std::vector< Element< ELEMENT_DIM, SPACE_DIM > * >::iterator elementIter, bool skipDeletedElements=true)
 

Private Member Functions

bool IsAtEnd ()
 
bool IsAllowedElement ()
 

Private Attributes

AbstractTetrahedralMeshmrMesh
 
std::vector< Element< ELEMENT_DIM, SPACE_DIM > * >::iterator mElementIter
 
bool mSkipDeletedElements
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator

A smart iterator over the elements in the mesh.

Definition at line 633 of file AbstractTetrahedralMesh.hpp.

Constructor & Destructor Documentation

◆ ElementIterator()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::ElementIterator ( AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &  rMesh,
typename std::vector< Element< ELEMENT_DIM, SPACE_DIM > * >::iterator  elementIter,
bool  skipDeletedElements = true 
)

Constructor for a new iterator.

This should not be called directly by user code; use the mesh methods AbstractTetrahedralMesh::GetElementIteratorBegin and AbstractTetrahedralMesh::GetElementIteratorEnd instead.

Parameters
rMeshthe mesh to iterator over
elementIterwhere to start iterating
skipDeletedElementswhether to include deleted elements

Definition at line 770 of file AbstractTetrahedralMesh.hpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::IsAllowedElement(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::mElementIter, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements, and AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::mrMesh.

Member Function Documentation

◆ IsAllowedElement()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::IsAllowedElement ( )
inlineprivate

Helper method to say if we're allowed to point at this element.

Returns
true if allowed

Definition at line 800 of file AbstractTetrahedralMesh.hpp.

Referenced by AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::ElementIterator().

◆ IsAtEnd()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::IsAtEnd ( )
inlineprivate

Helper method to say when we're at the end.

Returns
true if at end

Definition at line 794 of file AbstractTetrahedralMesh.hpp.

Referenced by AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::operator*().

◆ operator!=()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::operator!= ( const typename AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator rOther)
inline
Returns
Comparison not-equal-to.
Parameters
rOtheriterator with which comparison is made

Definition at line 752 of file AbstractTetrahedralMesh.hpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::mElementIter.

◆ operator*()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Element< ELEMENT_DIM, SPACE_DIM > & AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::operator* ( )
inline

Dereference the iterator giving you a *reference* to the current element.

Returns
reference Make sure to use a reference for the result to avoid copying elements unnecessarily.

Definition at line 738 of file AbstractTetrahedralMesh.hpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::IsAtEnd(), and AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::mElementIter.

◆ operator++()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator & AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::operator++ ( )
inline

Prefix increment operator.

Returns
reference to incremented object

Definition at line 758 of file AbstractTetrahedralMesh.hpp.

◆ operator->()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Element< ELEMENT_DIM, SPACE_DIM > * AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::operator-> ( )
inline

Member access from a pointer.

Returns
pointer

Definition at line 745 of file AbstractTetrahedralMesh.hpp.

Member Data Documentation

◆ mElementIter

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<Element<ELEMENT_DIM,SPACE_DIM>*>::iterator AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::mElementIter
private

◆ mrMesh

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractTetrahedralMesh& AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::mrMesh
private

The mesh we're iterating over.

Definition at line 678 of file AbstractTetrahedralMesh.hpp.

Referenced by AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::ElementIterator().

◆ mSkipDeletedElements

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ElementIterator::mSkipDeletedElements
private

Whether to skip deleted elements.

Definition at line 684 of file AbstractTetrahedralMesh.hpp.


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