libMesh::SideEdge< EdgeType, ParentType > Class Template Reference

#include <side.h>

Inheritance diagram for libMesh::SideEdge< EdgeType, ParentType >:

Public Member Functions

 SideEdge (const Elem *my_parent, const unsigned int my_edge)
 
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
 

Private Attributes

const unsigned int _edge_number
 

Detailed Description

template<class EdgeType, class ParentType>
class libMesh::SideEdge< EdgeType, ParentType >

This defines the SideEdge class. Like Side, SideEdge is basically a proxy (or stand-in replacement) class, this time for an element's edge. 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
Roy H. Stogner

Definition at line 153 of file side.h.

Constructor & Destructor Documentation

template<class EdgeType , class ParentType >
libMesh::SideEdge< EdgeType, ParentType >::SideEdge ( const Elem my_parent,
const unsigned int  my_edge 
)
inline

Constructor. Creates a side from an element.

Definition at line 160 of file side.h.

References libMesh::SideEdge< EdgeType, ParentType >::_edge_number, libMesh::dim, and libMesh::libmesh_assert().

161  :
162  EdgeType(const_cast<Elem*>(my_parent)),
163  _edge_number(my_edge)
164  {
165  libmesh_assert(my_parent);
166  libmesh_assert_less (_edge_number, this->parent()->n_edges());
167  libmesh_assert_equal_to (this->dim(), 1);
168  }

Member Function Documentation

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

Definition at line 201 of file side.h.

References libMesh::SideEdge< EdgeType, ParentType >::_edge_number, and n_nodes.

202  {
203  libmesh_assert_less (i, this->n_nodes());
204  return this->parent()->get_node (ParentType::edge_nodes_map[_edge_number][i]);
205  }
template<class EdgeType , class ParentType >
virtual unsigned int libMesh::SideEdge< EdgeType, ParentType >::n_sides ( ) const
inlinevirtual
Returns
0. Sides effectively do not have sides, so don't even ask!

Definition at line 220 of file side.h.

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

Definition at line 192 of file side.h.

References libMesh::SideEdge< EdgeType, ParentType >::_edge_number, and n_nodes.

193  {
194  libmesh_assert_less (i, this->n_nodes());
195  return this->parent()->node (ParentType::edge_nodes_map[_edge_number][i]);
196  }
template<class EdgeType , class ParentType >
virtual const Point& libMesh::SideEdge< EdgeType, ParentType >::point ( const unsigned int  i) const
inlinevirtual
Returns
the Point associated with local Node i.

Definition at line 173 of file side.h.

References libMesh::SideEdge< EdgeType, ParentType >::_edge_number, and n_nodes.

174  {
175  libmesh_assert_less (i, this->n_nodes());
176  return this->parent()->point (ParentType::edge_nodes_map[_edge_number][i]);
177  }
template<class EdgeType , class ParentType >
virtual Point& libMesh::SideEdge< EdgeType, ParentType >::point ( const unsigned int  i)
inlinevirtual
Returns
the Point associated with local Node i as a writeable reference.

Definition at line 183 of file side.h.

References libMesh::SideEdge< EdgeType, ParentType >::_edge_number, and n_nodes.

184  {
185  libmesh_assert_less (i, this->n_nodes());
186  return this->parent()->point (ParentType::edge_nodes_map[_edge_number][i]);
187  }
template<class EdgeType , class ParentType >
virtual Node* & libMesh::SideEdge< EdgeType, ParentType >::set_node ( const unsigned int  i)
inlinevirtual
Returns
the pointer to local Node i as a writeable reference.

Definition at line 210 of file side.h.

References libMesh::SideEdge< EdgeType, ParentType >::_edge_number, and n_nodes.

211  {
212  libmesh_assert_less (i, this->n_nodes());
213  return this->parent()->set_node (ParentType::edge_nodes_map[_edge_number][i]);
214  }

Member Data Documentation

template<class EdgeType , class ParentType >
const unsigned int libMesh::SideEdge< EdgeType, ParentType >::_edge_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