Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator Class Reference

#include <AbstractMesh.hpp>

+ Collaboration diagram for AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator:

Public Member Functions

Node< SPACE_DIM > & operator* ()
 
Node< SPACE_DIM > * operator-> ()
 
bool operator!= (const typename AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator &rOther)
 
NodeIteratoroperator++ ()
 
 NodeIterator (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, typename std::vector< Node< SPACE_DIM > * >::iterator nodeIter, bool skipDeletedNodes=true)
 

Private Member Functions

bool IsAtEnd ()
 
bool IsAllowedNode ()
 

Private Attributes

AbstractMeshmrMesh
 
std::vector< Node< SPACE_DIM > * >::iterator mNodeIter
 
bool mSkipDeletedNodes
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator

A smart iterator over the nodes in the mesh.

Definition at line 458 of file AbstractMesh.hpp.

Constructor & Destructor Documentation

◆ NodeIterator()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::NodeIterator ( AbstractMesh< ELEMENT_DIM, SPACE_DIM > &  rMesh,
typename std::vector< Node< SPACE_DIM > * >::iterator  nodeIter,
bool  skipDeletedNodes = true 
)

Constructor for a new iterator.

This should not be called directly by user code; use the mesh methods AbstractMesh::GetNodeIteratorBegin and AbstractMesh::GetNodeIteratorEnd instead.

Parameters
rMeshthe mesh to iterator over
nodeIterwhere to start iterating
skipDeletedNodeswhether to include deleted nodes

Definition at line 578 of file AbstractMesh.hpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::IsAllowedNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mNodeIter, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mrMesh.

Member Function Documentation

◆ IsAllowedNode()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::IsAllowedNode ( )
inlineprivate

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

Returns
true if allowed

Definition at line 608 of file AbstractMesh.hpp.

Referenced by AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::NodeIterator().

◆ IsAtEnd()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::IsAtEnd ( )
inlineprivate

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

Returns
true if at end

Definition at line 602 of file AbstractMesh.hpp.

Referenced by AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::operator*().

◆ operator!=()

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

Definition at line 560 of file AbstractMesh.hpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mNodeIter.

◆ operator*()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Node< SPACE_DIM > & AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::operator* ( )
inline

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

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

Definition at line 546 of file AbstractMesh.hpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::IsAtEnd(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mNodeIter.

◆ operator++()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator & AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::operator++ ( )
inline

Prefix increment operator.

Returns
incremented object

Definition at line 566 of file AbstractMesh.hpp.

◆ operator->()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Node< SPACE_DIM > * AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::operator-> ( )
inline

Member access from a pointer.

Returns
pointer

Definition at line 553 of file AbstractMesh.hpp.

Member Data Documentation

◆ mNodeIter

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<Node<SPACE_DIM>*>::iterator AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mNodeIter
private

◆ mrMesh

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractMesh& AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mrMesh
private

The mesh we're iterating over.

Definition at line 502 of file AbstractMesh.hpp.

Referenced by AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::NodeIterator().

◆ mSkipDeletedNodes

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mSkipDeletedNodes
private

Whether to skip deleted nodes.

Definition at line 508 of file AbstractMesh.hpp.


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