libMesh
Public Member Functions | Private Attributes | List of all members
libMesh::Side< SideType, ParentType > Class Template Reference

This defines the Side class. More...

#include <side.h>

Inheritance diagram for libMesh::Side< SideType, ParentType >:
[legend]

Public Member Functions

 Side (const Elem *parent_in, const unsigned int side_in)
 Constructor. More...
 
 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
 Setting a side node changes the node on the parent. More...
 
virtual unsigned int n_sides () const override
 Sides do not have sides. More...
 
virtual bool is_child_on_side (const unsigned int, const unsigned int) const override
 

Private Attributes

const unsigned int _side_number
 The side on the parent element. More...
 

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
Date
2004 Proxy class for efficiently representing an Elem's side.

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 
)

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
The side on the parent element.
Definition: side.h:101

◆ 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

◆ is_child_on_side()

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

Definition at line 91 of file side.h.

93  { libmesh_not_implemented(); return false; }

◆ n_sides()

template<class SideType , class ParentType >
virtual unsigned int libMesh::Side< SideType, ParentType >::n_sides ( ) const
overridevirtual

Sides do not have sides.

Definition at line 88 of file side.h.

89  { return 0; }

◆ 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)
overridevirtual

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 libMesh::MeshTools::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  }
dof_id_type n_nodes(const MeshBase::const_node_iterator &begin, const MeshBase::const_node_iterator &end)
Count up the number of nodes of a specific type (as defined by an iterator range).
const unsigned int _side_number
The side on the parent element.
Definition: side.h:101

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