libMesh::Elem::SideIter Class Reference

#include <elem.h>

Public Member Functions

 SideIter (const unsigned int side_number, Elem *parent)
 
 SideIter ()
 
 SideIter (const SideIter &other)
 
SideIteroperator= (const SideIter &other)
 
Elem *& operator* () const
 
SideIteroperator++ ()
 
bool operator== (const SideIter &other) const
 
bool side_on_boundary () const
 

Private Member Functions

void _update_side_ptr () const
 

Private Attributes

AutoPtr< Elem_side
 
Elem_side_ptr
 
Elem_parent
 
unsigned int _side_number
 

Detailed Description

The definition of the protected nested SideIter class.

Definition at line 2218 of file elem.h.

Constructor & Destructor Documentation

libMesh::Elem::SideIter::SideIter ( const unsigned int  side_number,
Elem parent 
)
inline

Definition at line 2222 of file elem.h.

2224  : _side(),
2225  _side_ptr(NULL),
2226  _parent(parent),
2227  _side_number(side_number)
2228  {}
libMesh::Elem::SideIter::SideIter ( )
inline

Definition at line 2232 of file elem.h.

2233  : _side(),
2234  _side_ptr(NULL),
2235  _parent(NULL),
2237  {}
libMesh::Elem::SideIter::SideIter ( const SideIter other)
inline

Definition at line 2241 of file elem.h.

2242  : _side(),
2243  _side_ptr(NULL),
2244  _parent(other._parent),
2245  _side_number(other._side_number)
2246  {}

Member Function Documentation

void libMesh::Elem::SideIter::_update_side_ptr ( ) const
inlineprivate

Definition at line 2295 of file elem.h.

References _parent, _side, _side_number, _side_ptr, and libMesh::Elem::build_side().

Referenced by operator*().

2296  {
2297  // Construct new side, store in AutoPtr
2298  this->_side = this->_parent->build_side(this->_side_number);
2299 
2300  // Also set our internal naked pointer. Memory is still owned
2301  // by the AutoPtr.
2302  this->_side_ptr = _side.get();
2303  }
Elem*& libMesh::Elem::SideIter::operator* ( ) const
inline

Definition at line 2258 of file elem.h.

References _side_ptr, and _update_side_ptr().

2259  {
2260  // Set the AutoPtr
2261  this->_update_side_ptr();
2262 
2263  // Return a reference to _side_ptr
2264  return this->_side_ptr;
2265  }
SideIter& libMesh::Elem::SideIter::operator++ ( )
inline

Definition at line 2268 of file elem.h.

References _side_number.

2269  {
2270  ++_side_number;
2271  return *this;
2272  }
SideIter& libMesh::Elem::SideIter::operator= ( const SideIter other)
inline

Definition at line 2250 of file elem.h.

References _parent, and _side_number.

2251  {
2252  this->_parent = other._parent;
2253  this->_side_number = other._side_number;
2254  return *this;
2255  }
bool libMesh::Elem::SideIter::operator== ( const SideIter other) const
inline

Definition at line 2276 of file elem.h.

References _parent, and _side_number.

2277  {
2278  return (this->_side_number == other._side_number &&
2279  this->_parent == other._parent);
2280  }
bool libMesh::Elem::SideIter::side_on_boundary ( ) const
inline

Definition at line 2287 of file elem.h.

References _parent, _side_number, and libMesh::Elem::neighbor().

2288  {
2289  return this->_parent->neighbor(_side_number) == NULL;
2290  }

Member Data Documentation

Elem* libMesh::Elem::SideIter::_parent
private

Definition at line 2319 of file elem.h.

Referenced by _update_side_ptr(), operator=(), operator==(), and side_on_boundary().

AutoPtr<Elem> libMesh::Elem::SideIter::_side
mutableprivate

Definition at line 2307 of file elem.h.

Referenced by _update_side_ptr().

unsigned int libMesh::Elem::SideIter::_side_number
private

Definition at line 2322 of file elem.h.

Referenced by _update_side_ptr(), operator++(), operator=(), operator==(), and side_on_boundary().

Elem* libMesh::Elem::SideIter::_side_ptr
mutableprivate

Definition at line 2316 of file elem.h.

Referenced by _update_side_ptr(), and operator*().


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

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:18 UTC

Hosted By:
SourceForge.net Logo