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

std::unique_ptr< Elem_side
 
Elem_side_ptr
 
Elem_parent
 
unsigned int _side_number
 

Detailed Description

The definition of the protected nested SideIter class.

Definition at line 2840 of file elem.h.

Constructor & Destructor Documentation

◆ SideIter() [1/3]

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

Definition at line 2844 of file elem.h.

2846  : _side(),
2847  _side_ptr(nullptr),
2848  _parent(parent),
2849  _side_number(side_number)
2850  {}
const Elem * parent() const
Definition: elem.h:2479
unsigned int _side_number
Definition: elem.h:2944
std::unique_ptr< Elem > _side
Definition: elem.h:2929

◆ SideIter() [2/3]

libMesh::Elem::SideIter::SideIter ( )
inline

Definition at line 2854 of file elem.h.

2855  : _side(),
2856  _side_ptr(nullptr),
2857  _parent(nullptr),
2859  {}
const unsigned int invalid_uint
Definition: libmesh.h:245
unsigned int _side_number
Definition: elem.h:2944
std::unique_ptr< Elem > _side
Definition: elem.h:2929

◆ SideIter() [3/3]

libMesh::Elem::SideIter::SideIter ( const SideIter other)
inline

Definition at line 2863 of file elem.h.

2864  : _side(),
2865  _side_ptr(nullptr),
2866  _parent(other._parent),
2867  _side_number(other._side_number)
2868  {}
unsigned int _side_number
Definition: elem.h:2944
std::unique_ptr< Elem > _side
Definition: elem.h:2929

Member Function Documentation

◆ _update_side_ptr()

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

Definition at line 2917 of file elem.h.

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

Referenced by operator*().

2918  {
2919  // Construct new side, store in std::unique_ptr
2920  this->_side = this->_parent->build_side_ptr(this->_side_number);
2921 
2922  // Also set our internal naked pointer. Memory is still owned
2923  // by the std::unique_ptr.
2924  this->_side_ptr = _side.get();
2925  }
unsigned int _side_number
Definition: elem.h:2944
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy=true)=0
std::unique_ptr< Elem > _side
Definition: elem.h:2929

◆ operator*()

Elem*& libMesh::Elem::SideIter::operator* ( ) const
inline

Definition at line 2880 of file elem.h.

References _side_ptr, and _update_side_ptr().

2881  {
2882  // Set the std::unique_ptr
2883  this->_update_side_ptr();
2884 
2885  // Return a reference to _side_ptr
2886  return this->_side_ptr;
2887  }
void _update_side_ptr() const
Definition: elem.h:2917

◆ operator++()

SideIter& libMesh::Elem::SideIter::operator++ ( )
inline

Definition at line 2890 of file elem.h.

References _side_number.

2891  {
2892  ++_side_number;
2893  return *this;
2894  }
unsigned int _side_number
Definition: elem.h:2944

◆ operator=()

SideIter& libMesh::Elem::SideIter::operator= ( const SideIter other)
inline

Definition at line 2872 of file elem.h.

References _parent, and _side_number.

2873  {
2874  this->_parent = other._parent;
2875  this->_side_number = other._side_number;
2876  return *this;
2877  }
unsigned int _side_number
Definition: elem.h:2944

◆ operator==()

bool libMesh::Elem::SideIter::operator== ( const SideIter other) const
inline

Definition at line 2898 of file elem.h.

References _parent, and _side_number.

2899  {
2900  return (this->_side_number == other._side_number &&
2901  this->_parent == other._parent);
2902  }
unsigned int _side_number
Definition: elem.h:2944

◆ side_on_boundary()

bool libMesh::Elem::SideIter::side_on_boundary ( ) const
inline

Definition at line 2909 of file elem.h.

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

2910  {
2911  return this->_parent->neighbor_ptr(_side_number) == nullptr;
2912  }
unsigned int _side_number
Definition: elem.h:2944
const Elem * neighbor_ptr(unsigned int i) const
Definition: elem.h:2050

Member Data Documentation

◆ _parent

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

Definition at line 2941 of file elem.h.

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

◆ _side

std::unique_ptr<Elem> libMesh::Elem::SideIter::_side
mutableprivate

Definition at line 2929 of file elem.h.

Referenced by _update_side_ptr().

◆ _side_number

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

Definition at line 2944 of file elem.h.

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

◆ _side_ptr

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

Definition at line 2938 of file elem.h.

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


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