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

#include <side.h>

List of all members.

Public Member Functions

 Side (const Elem *parent_in, const unsigned int side_in)
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 50 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 57 of file side.h.

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

                                    :
    SideType(const_cast<Elem*>(parent_in)),
    _side_number(side_in)
  {
    libmesh_assert(parent_in);
    // may not be true when building infinite element sides
    // libmesh_assert_less (_side_number, this->parent()->n_sides());
    libmesh_assert_equal_to ((this->dim()+1), this->parent()->dim());

    for (unsigned int n=0; n != this->n_nodes(); ++n)
      this->_nodes[n] = this->parent()->get_node
        (ParentType::side_nodes_map[_side_number][n]);
  }

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 [inline, virtual]

Definition at line 87 of file side.h.

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

Sides effectively do not have sides

Definition at line 84 of file side.h.

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

Setting a side node changes the node on the parent

Definition at line 75 of file side.h.

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

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

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 98 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: