Side Class Reference
[Finite Element Mesh]
#include <Side.h>
Detailed Description
To store and treat finite element sides (edges in2-D or faces in 3-D).Defines a side of a finite element mesh. The sides are given in particular by their shapes and a list of nodes. Each node can be accessed by the member function PtrNode(). The string defining the element shape must be chosen according to the following list :
| Shape | Shape Name | Dimension | Min. Number of nodes |
| Line | line | 2 | 2 |
| Triangle | tria | 3 | 3 |
| Quadrilateral | quad | 3 | 4 |
Public Types | |
| enum | SideType { INTERNAL_SIDE = 0, EXTERNAL_BOUNDARY = 1, INTERNAL_BOUNDARY = 2 } |
Public Member Functions | |
| void | Add (Node *node) |
| Insert a node at end of list of nodes of side. | |
| void | AddNeighbor (Element *el) |
| Set pointer to neighbor element. | |
| void | DOF (size_t i, size_t dof) |
| Define label of DOF. | |
| int | getCode (size_t dof) const |
| Return code for a given DOF of node. | |
| size_t | getDOF (size_t i) const |
| Return label of i-th dof. | |
| size_t | getFirstDOF () const |
| Return label of first dof of node. | |
| size_t | getLabel () const |
| Return label of side. | |
| double | getMeasure () const |
| Return measure of side. | |
| size_t | getNbDOF () const |
| Return nb of DOF. | |
| size_t | getNbEq () const |
| Return number of side equations. | |
| size_t | getNbNodes () const |
| Return number of side nodes. | |
| size_t | getNbVertices () const |
| Return number of side vertices. | |
| Element * | getNeighborElement (size_t i) const |
| Return pointer to i-th side neighboring element. | |
| size_t | getNodeLabel (size_t i) const |
| Return global label of node with given local label. | |
| Node * | getPtrNode (size_t i) const |
| Return pointer to node of local label i. | |
| int | getShape () const |
| Return side's shape. | |
| int | isOnBoundary () const |
| Boundary side or not. | |
| Node * | operator() (size_t i) const |
| Operator () : Returns pointer to i-th node. | |
| void | Replace (size_t label, Node *node) |
| Replace a node at a given local label. | |
| void | setCode (size_t dof, int code) |
| Assign code to a DOF. | |
| void | setDOF (size_t &first_dof, size_t nb_dof) |
| Define number of DOF. | |
| void | setFirstDOF (size_t n) |
| Define First DOF. | |
| void | setLabel (size_t i) |
| Define label of side. | |
| void | setNbDOF (size_t nb_dof) |
| Set number of degrees of freedom (DOF). | |
| void | setNode (size_t i, Node *node) |
| Assign a node given by its pointer as the i-th node of side. | |
| void | setOnBoundary () |
| Say that the side is on the boundary. | |
| Side (const Side &sd) | |
| Copy constructor. | |
| Side (size_t label, int shape) | |
| Constructor initializing side label and shape. | |
| Side (size_t label, const string &shape) | |
| Constructor initializing side label and shape. | |
| Side () | |
| Default Constructor. | |
| ~Side () | |
| Destructor. | |
Member Enumeration Documentation
| enum SideType |
Constructor & Destructor Documentation
| Side | ( | size_t | label, | |
| const string & | shape | |||
| ) |
Constructor initializing side label and shape.
- Parameters:
-
label [in] Label to assign to side. shape [in] Shape of side (See class description).
| Side | ( | size_t | label, | |
| int | shape | |||
| ) |
Constructor initializing side label and shape.
- Parameters:
-
label [in] Label to assign to side. shape [in] Shape of side (See enum ElementShape in Mesh).
Member Function Documentation
| void DOF | ( | size_t | i, | |
| size_t | dof | |||
| ) |
Define label of DOF.
- Parameters:
-
[in] i DOF index [in] dof Its label
| double getMeasure | ( | ) | const |
Return measure of side.
This member function returns length or area of side. In case of quadrilaterals it returns determinant of Jacobian of mapping between reference and actual side
| int isOnBoundary | ( | ) | const |
Boundary side or not.
Returns 1 or -1 if side is on boundary Depending on whether the first or the second neighbor element is defined Returns 0 if side is an inner one This member function is valid only if member function Mesh::getAllSides() or Mesh::getBoundarySides() has been called before.
| void setDOF | ( | size_t & | first_dof, | |
| size_t | nb_dof | |||
| ) |
Define number of DOF.
- Parameters:
-
[in,out] first_dof Label of the first DOF in input that is actualized [in] nb_dof Number of DOF