libMesh::Side< SideType, ParentType > Class Template Reference

Proxy class for efficiently representing an Elem's side. More...

#include <side.h>

Inheritance diagram for libMesh::Side< SideType, ParentType >:

Public Member Functions

 Side (const Elem *parent_in, const unsigned int side_in)
 
 Side (Side &&)=delete
 
 Side (const Side &)=delete
 
Sideoperator= (const Side &)=delete
 
Sideoperator= (Side &&)=delete
 
virtual ~Side ()=default
 
virtual Node *& set_node (const unsigned int i) override
 

Private Attributes

const unsigned int _side_number
 

Detailed Description

template<class SideType, class ParentType>
class libMesh::Side< SideType, ParentType >

Proxy class for efficiently representing an Elem's side.

This defines the Side class. A Side is basically a proxy (or stand-in replacement) class for an element's side. It acts like a standard Elem, but allocates no additional memory for storing connectivity. Instead, its nodes are mapped directly from the parent element (the element for which the side is created). Similarly, you cannot access the neighbors of a side since it does not store any.

Author
Benjamin S. Kirk
Date
2004

Definition at line 48 of file side.h.

Constructor & Destructor Documentation

◆ Side() [1/3]

template<class SideType , class ParentType >
libMesh::Side< SideType, ParentType >::Side ( const Elem parent_in,
const unsigned int  side_in 
)
inline

Constructor. Creates a side from an element.

Definition at line 55 of file side.h.

References libMesh::Side< SideType, ParentType >::_side_number.

56  :
57  SideType(const_cast<Elem *>(parent_in)),
58  _side_number(side_in)
59  {
60  libmesh_assert(parent_in);
61  // may not be true when building infinite element sides
62  // libmesh_assert_less (_side_number, this->parent()->n_sides());
63  libmesh_assert_equal_to ((this->dim()+1), this->parent()->dim());
64 
65  for (auto n : this->node_index_range())
66  this->_nodes[n] = this->parent()->node_ptr
67  (ParentType::side_nodes_map[_side_number][n]);
68  }
const unsigned int _side_number
Definition: side.h:90

◆ Side() [2/3]

template<class SideType , class ParentType >
libMesh::Side< SideType, ParentType >::Side ( Side< SideType, ParentType > &&  )
delete

◆ Side() [3/3]

template<class SideType , class ParentType >
libMesh::Side< SideType, ParentType >::Side ( const Side< SideType, ParentType > &  )
delete

◆ ~Side()

template<class SideType , class ParentType >
virtual libMesh::Side< SideType, ParentType >::~Side ( )
virtualdefault

Member Function Documentation

◆ operator=() [1/2]

template<class SideType , class ParentType >
Side& libMesh::Side< SideType, ParentType >::operator= ( const Side< SideType, ParentType > &  )
delete

◆ operator=() [2/2]

template<class SideType , class ParentType >
Side& libMesh::Side< SideType, ParentType >::operator= ( Side< SideType, ParentType > &&  )
delete

◆ set_node()

template<class SideType , class ParentType >
virtual Node* & libMesh::Side< SideType, ParentType >::set_node ( const unsigned int  i)
inlineoverridevirtual

Setting a side node changes the node on the parent.

Definition at line 79 of file side.h.

References libMesh::Side< SideType, ParentType >::_side_number, and n_nodes.

80  {
81  libmesh_assert_less (i, this->n_nodes());
82  return this->parent()->set_node (ParentType::side_nodes_map[_side_number][i]);
83  }
const dof_id_type n_nodes
Definition: tecplot_io.C:68
const unsigned int _side_number
Definition: side.h:90

Member Data Documentation

◆ _side_number

template<class SideType , class ParentType >
const unsigned int libMesh::Side< SideType, ParentType >::_side_number
private

The side on the parent element.

Definition at line 90 of file side.h.

Referenced by libMesh::Side< SideType, ParentType >::set_node(), and libMesh::Side< SideType, ParentType >::Side().


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