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)
 
virtual Node *& set_node (const unsigned int i) libmesh_override
 
virtual unsigned int n_sides () const libmesh_override
 
virtual bool is_child_on_side (const unsigned int, const unsigned int) const libmesh_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

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, libMesh::libmesh_assert(), and n_nodes.

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 (unsigned int n=0; n != this->n_nodes(); ++n)
66  this->_nodes[n] = this->parent()->node_ptr
67  (ParentType::side_nodes_map[_side_number][n]);
68  }
libmesh_assert(j)
const dof_id_type n_nodes
Definition: tecplot_io.C:67
const unsigned int _side_number
Definition: side.h:95

Member Function Documentation

template<class SideType , class ParentType >
virtual bool libMesh::Side< SideType, ParentType >::is_child_on_side ( const unsigned  int,
const unsigned  int 
) const
inlinevirtual

Definition at line 85 of file side.h.

87  { libmesh_not_implemented(); return false; }
template<class SideType , class ParentType >
virtual unsigned int libMesh::Side< SideType, ParentType >::n_sides ( ) const
inlinevirtual

Sides do not have sides.

Definition at line 82 of file side.h.

83  { return 0; }
template<class SideType , class ParentType >
virtual Node* & libMesh::Side< SideType, ParentType >::set_node ( const unsigned int  i)
inlinevirtual

Setting a side node changes the node on the parent.

Definition at line 73 of file side.h.

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

74  {
75  libmesh_assert_less (i, this->n_nodes());
76  return this->parent()->set_node (ParentType::side_nodes_map[_side_number][i]);
77  }
const dof_id_type n_nodes
Definition: tecplot_io.C:67
const unsigned int _side_number
Definition: side.h:95

Member Data Documentation

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

The side on the parent element.

Definition at line 95 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: