To store and treat finite element sides (edges in2-D or faces in 3-D) More...
Public Types | |
| enum | SideType { INTERNAL_SIDE = 0, EXTERNAL_BOUNDARY = 1, INTERNAL_BOUNDARY = 2 } |
Public Member Functions | |
| Side () | |
| Default Constructor. | |
| Side (size_t label, const string &shape) | |
| Constructor initializing side label and shape. | |
| Side (size_t label, int shape) | |
| Constructor initializing side label and shape. | |
| Side (const Side &sd) | |
| Copy constructor. | |
| ~Side () | |
| Destructor. | |
| void | Add (Node *node) |
| Insert a node at end of list of nodes of side. | |
| void | Add (Edge *edge) |
| Insert an edge at end of list of edges of side. | |
| void | setLabel (size_t i) |
| Define label of side. | |
| void | setFirstDOF (size_t n) |
| Define First DOF. | |
| void | setNbDOF (size_t nb_dof) |
| Set number of degrees of freedom (DOF). | |
| void | DOF (size_t i, size_t dof) |
| Define label of DOF. | |
| void | setDOF (size_t &first_dof, size_t nb_dof) |
| Define number of DOF. | |
| void | setCode (size_t dof, int code) |
| Assign code to a DOF. | |
| void | setCode (const string &exp, int code, size_t dof=1) |
| Define code by a boolean algebraic expression invoking coordinates of side nodes. | |
| void | Replace (size_t label, Node *node) |
| Replace a node at a given local label. | |
| void | Add (Element *el) |
| Set pointer to neighbor element. | |
| void | setNode (size_t i, Node *node) |
| Assign a node given by its pointer as the i-th node of side. | |
| int | getShape () const |
| Return side's shape. | |
| size_t | getLabel () const |
| Return label of side. | |
| size_t | n () const |
| Return label of side. | |
| size_t | getNbNodes () const |
| Return number of side nodes. | |
| size_t | getNbVertices () const |
| Return number of side vertices. | |
| size_t | getNbEq () const |
| Return number of side equations. | |
| size_t | getNbDOF () const |
| Return number of DOF. | |
| int | getCode (size_t dof=1) 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. | |
| Node * | getPtrNode (size_t i) const |
| Return pointer to node of local label i. | |
| Node * | operator() (size_t i) const |
| Operator (). | |
| size_t | getNodeLabel (size_t i) const |
| Return global label of node with given local label. | |
| Element * | getNeighborElement (size_t i) const |
| Return pointer to i-th side neighboring element. | |
| Point< double > | getNormal () const |
| Return normal vector to side. | |
| Point< double > | getUnitNormal () const |
| Return unit normal vector to side. | |
| int | isOnBoundary () const |
| Boundary side or not. | |
| void | setOnBoundary () |
| Say that the side is on the boundary. | |
| double | getMeasure () const |
| Return measure of side. | |
| size_t | Contains (const Node *nd) const |
| void | setActive (bool opt=true) |
Set side is active (default) or not if argument is false. | |
| bool | isActive () const |
Return true or false whether side is active or not. | |
| int | getLevel () const |
| void | setChild (Side *sd) |
| Assign side as child of current one and assign current side as father This function is principally used when refining is invoked (e.g. for mesh adaption) | |
| Side * | getParent () const |
| Side * | getChild (size_t i) const |
| size_t | getNbChilds () const |
| Return number of children of side. | |
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 getPtrNode(). 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 |
Member Enumeration Documentation
| enum SideType |
Constructor & Destructor Documentation
| Side | ( | size_t | label, |
| const string & | shape | ||
| ) |
Constructor initializing side label and shape.
- Parameters:
-
[in] label Label to assign to side. [in] shape Shape of side (See class description).
| Side | ( | size_t | label, |
| int | shape | ||
| ) |
Constructor initializing side label and shape.
- Parameters:
-
[in] label to assign to side. [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
| 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
| void setCode | ( | const string & | exp, |
| int | code, | ||
| size_t | dof = 1 |
||
| ) |
Define code by a boolean algebraic expression invoking coordinates of side nodes.
- Parameters:
-
[in] exp Boolean algebraic expression as required by fparser [in] code Code to assign to node if the algebraic expression is true [in] dof Degree of Freedom for which code is assigned [Default: 1]
| int getCode | ( | size_t | dof = 1 | ) | const |
Return code for a given DOF of node.
- Parameters:
-
[in] dof Local label of degree of freedom. Default value is 1.
| Node* operator() | ( | size_t | i | ) | const |
Operator ().
Return pointer to node of local label i.
Return normal vector to side.
The normal vector is oriented from the first neighbor element to the second one.
- Warning:
- The norm of this vector is equal to the measure of the side (length of the edge in 2-D and area of the face in 3-D), and To get the unit normal, use rather the member function getUnitNormal.
| Point<double> getUnitNormal | ( | ) | const |
Return unit normal vector to side.
The unit normal vector is oriented from the first neighbor element to the second one.
- Remarks:
- The norm of this vector is equal to one.
| 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.
| 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
Say if a given node belongs to current side
- Parameters:
-
[in] nd Pointer to searched node
- Returns:
- index (local label) of node if found,
0if not
| int getLevel | ( | ) | const |
Return side level Side level increases when side is refined (starting from 0). If the level is 0, then the element has no father
Assign side as child of current one and assign current side as father This function is principally used when refining is invoked (e.g. for mesh adaption)
- Parameters:
-
[in] sd Pointer to side to assign
- OFELI
- Side