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

#include <side.h>

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

Public Member Functions

 Side (const Elem *parent_in, const unsigned int side_in)
 
virtual const Pointpoint (const unsigned int i) const
 
virtual Pointpoint (const unsigned int i)
 
virtual dof_id_type node (const unsigned int i) const
 
virtual Nodeget_node (const unsigned int i) const
 
virtual Node *& set_node (const unsigned int i)
 
virtual unsigned int n_sides () const
 
virtual bool is_child_on_side (const unsigned int, const unsigned int) const
 

Private Attributes

const unsigned int _side_number
 

Detailed Description

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

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

Definition at line 53 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 60 of file side.h.

References libMesh::dim, and libMesh::libmesh_assert().

61  :
62  SideType(const_cast<Elem*>(parent_in)),
63  _side_number(side_in)
64  {
65  libmesh_assert(parent_in);
66  // may not be true when building infinite element sides
67  // libmesh_assert_less (_side_number, this->parent()->n_sides());
68  libmesh_assert_equal_to ((this->dim()+1), this->parent()->dim());
69  }

Member Function Documentation

template<class SideType , class ParentType >
virtual Node* libMesh::Side< SideType, ParentType >::get_node ( const unsigned int  i) const
inlinevirtual
Returns
the pointer to local Node i.

Definition at line 102 of file side.h.

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

103  {
104  libmesh_assert_less (i, this->n_nodes());
105  return this->parent()->get_node (ParentType::side_nodes_map[_side_number][i]);
106  }
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 123 of file side.h.

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

Sides effectively do not have sides

Definition at line 120 of file side.h.

121  { return 0; }
template<class SideType , class ParentType >
virtual dof_id_type libMesh::Side< SideType, ParentType >::node ( const unsigned int  i) const
inlinevirtual
Returns
the global id number of local Node i.

Definition at line 93 of file side.h.

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

94  {
95  libmesh_assert_less (i, this->n_nodes());
96  return this->parent()->node (ParentType::side_nodes_map[_side_number][i]);
97  }
template<class SideType , class ParentType >
virtual const Point& libMesh::Side< SideType, ParentType >::point ( const unsigned int  i) const
inlinevirtual
Returns
the Point associated with local Node i.

Definition at line 74 of file side.h.

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

75  {
76  libmesh_assert_less (i, this->n_nodes());
77  return this->parent()->point (ParentType::side_nodes_map[_side_number][i]);
78  }
template<class SideType , class ParentType >
virtual Point& libMesh::Side< SideType, ParentType >::point ( const unsigned int  i)
inlinevirtual
Returns
the Point associated with local Node i as a writeable reference.

Definition at line 84 of file side.h.

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

85  {
86  libmesh_assert_less (i, this->n_nodes());
87  return this->parent()->point (ParentType::side_nodes_map[_side_number][i]);
88  }
template<class SideType , class ParentType >
virtual Node* & libMesh::Side< SideType, ParentType >::set_node ( const unsigned int  i)
inlinevirtual
Returns
the pointer to local Node i as a writeable reference.

Definition at line 111 of file side.h.

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

112  {
113  libmesh_assert_less (i, this->n_nodes());
114  return this->parent()->set_node (ParentType::side_nodes_map[_side_number][i]);
115  }

Member Data Documentation

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

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

Site Created By: libMesh Developers
Last modified: February 07 2014 16:58:02 UTC

Hosted By:
SourceForge.net Logo