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

This defines the SideEdge class. More...

#include <side.h>

Inheritance diagram for libMesh::SideEdge< EdgeType, ParentType >:
[legend]

Public Member Functions

 SideEdge (const Elem *my_parent, const unsigned int my_edge)
 Constructor. More...
 
virtual Node *& set_node (const unsigned int i) override
 Setting an edge node changes the node on the parent. More...
 

Private Attributes

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

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 112 of file side.h.

Constructor & Destructor Documentation

◆ SideEdge()

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 119 of file side.h.

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

120  :
121  EdgeType(const_cast<Elem *>(my_parent)),
122  _edge_number(my_edge)
123  {
124  // Our more-optimized non-proxy side code makes this class
125  // obsolete.
126  libmesh_deprecated();
127 
128  libmesh_assert(my_parent);
129  libmesh_assert_less (_edge_number, this->parent()->n_edges());
130  libmesh_assert_equal_to (this->dim(), 1);
131 
132  for (auto n : this->node_index_range())
133  this->_nodes[n] = this->parent()->node_ptr
134  (ParentType::edge_nodes_map[_edge_number][n]);
135  }
unsigned int dim
const unsigned int _edge_number
The side on the parent element.
Definition: side.h:151
libmesh_assert(ctx)

Member Function Documentation

◆ set_node()

template<class EdgeType , class ParentType >
virtual Node* & libMesh::SideEdge< EdgeType, ParentType >::set_node ( const unsigned int  i)
inlineoverridevirtual

Setting an edge node changes the node on the parent.

Definition at line 140 of file side.h.

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

141  {
142  libmesh_assert_less (i, this->n_nodes());
143  return this->parent()->set_node (ParentType::edge_nodes_map[_edge_number][i]);
144  }
const unsigned int _edge_number
The side on the parent element.
Definition: side.h:151
const dof_id_type n_nodes
Definition: tecplot_io.C:67

Member Data Documentation

◆ _edge_number

template<class EdgeType , class ParentType >
const unsigned int libMesh::SideEdge< EdgeType, ParentType >::_edge_number
private

The side on the parent element.

Definition at line 151 of file side.h.

Referenced by libMesh::SideEdge< EdgeType, ParentType >::set_node(), and libMesh::SideEdge< EdgeType, ParentType >::SideEdge().


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