To describe a node. More...
#include <Node.h>
Public Member Functions | |
| Node () | |
| Default constructor. | |
| Node (size_t label, const Point< real_t > &x) | |
| Constructor with label and coordinates. | |
| Node (const Node &node) | |
| Copy Constructor. | |
| ~Node () | |
| Destructor. | |
| void | setLabel (size_t label) |
| Define label of node. | |
| void | setNbDOF (size_t n) |
| Define number of DOF. | |
| void | setFirstDOF (size_t n) |
| Define First DOF. | |
| void | setCode (size_t dof, int code) |
| Define code for a given DOF of node. | |
| void | setCode (const vector< int > &code) |
| Define codes for all node DOFs. | |
| void | setCode (int *code) |
| Define codes for all node DOFs. | |
| void | setCode (const string &exp, int code, size_t dof=1) |
| Define code by a boolean algebraic expression invoking node coordinates. | |
| void | setCoord (size_t i, real_t x) |
| Set i-th coordinate. | |
| 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 | setOnBoundary () |
| Set node as boundary node. | |
| size_t | n () const |
| Return label of node. | |
| size_t | getNbDOF () const |
| Return number of degrees of freedom (DOF) | |
| int | getCode (size_t dof) const |
| Return code for a given DOF of node. | |
| int | getCode () const |
| Return global code of node. | |
| real_t | getCoord (size_t i) const |
| Return i-th coordinate of node. i = 1..3. | |
| Point< real_t > | getCoord () const |
| Return coordinates of node. | |
| real_t | getX () const |
| Return x-coordinate of node. | |
| real_t | getY () const |
| Return y-coordinate of node. | |
| real_t | getZ () const |
| Return z-coordinate of node. | |
| Point< real_t > | getXYZ () const |
| Return coordinates of node. | |
| size_t | getDOF (size_t i) const |
| Return label of i-th dof. | |
| size_t | getNbNeigEl () const |
| Return number of neighbor elements. | |
| Element * | getNeigEl (size_t i) const |
| Return i-th neighbor element. | |
| size_t | getFirstDOF () const |
| Return label of first DOF of node. | |
| bool | isOnBoundary () const |
| Say if node is a boundary node. | |
| void | Add (Element *el) |
Add element pointed by el as neighbor element to node. | |
| void | setLevel (int level) |
| Assign a level to current node. | |
| int | getLevel () const |
| Return node level. | |
To describe a node.
A node is characterized by its label, its coordinates, its number of degrees of freedom (DOF) and codes that are associated to each DOF.
| Node | ( | ) |
Default constructor.
Initialize data to zero
Constructor with label and coordinates.
| [in] | label | Label of node |
| [in] | x | Node coordinates |
| void DOF | ( | size_t | i, |
| size_t | dof ) |
Define label of DOF.
| [in] | i | DOF index |
| [in] | dof | Label of DOF |
| int getCode | ( | size_t | dof | ) | const |
Return code for a given DOF of node.
| [in] | dof | label of degree of freedom for which code is to be returned. Default value is 1. |
| Point< real_t > getCoord | ( | ) | const |
Return coordinates of node.
Return value is an instance of class Point
| int getLevel | ( | ) | const |
Return node level.
Node level decreases when element is refined (starting from 0). If the level is 0, then the element has no parents
| size_t getNbNeigEl | ( | ) | const |
Return number of neighbor elements.
Neighbor elements are those that share node. Note that the returned information is valid only if the Mesh member function getNodeNeighborElements() has been invoked before
| Element * getNeigEl | ( | size_t | i | ) | const |
Return i-th neighbor element.
Note that the returned information is valid only if the Mesh member function getNodeNeighborElements() has been invoked before
| Point< real_t > getXYZ | ( | ) | const |
Return coordinates of node.
Return value is an instance of class Point
| bool isOnBoundary | ( | ) | const |
Say if node is a boundary node.
Note this information is available only if boundary sides (and nodes) were determined (See class Mesh).
| void setCode | ( | const string & | exp, |
| int | code, | ||
| size_t | dof = 1 ) |
Define code by a boolean algebraic expression invoking node coordinates.
| [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] |
| void setCode | ( | const vector< int > & | code | ) |
Define codes for all node DOFs.
| [in] | code | vector instance that contains code for each DOF of current node |
| void setCode | ( | int * | code | ) |
Define codes for all node DOFs.
| [in] | code | C-array that contains code for each DOF of current node |
| void setCode | ( | size_t | dof, |
| int | code ) |
Define code for a given DOF of node.
| [in] | dof | DOF index |
| [in] | code | Code to assign to DOF |
| void setCoord | ( | size_t | i, |
| real_t | x ) |
Set i-th coordinate.
| [in] | i | Coordinate index (1..3) |
| [in] | x | Coordinate value |
| void setDOF | ( | size_t & | first_dof, |
| size_t | nb_dof ) |
Define number of DOF.
| [in,out] | first_dof | Label of the first DOF in input that is actualized |
| [in] | nb_dof | Number of DOF |
| void setLevel | ( | int | level | ) |
Assign a level to current node.
This member function is useful for mesh adaption.
Default node's level is zero
| void setOnBoundary | ( | ) |
Set node as boundary node.
This function is mostly internally used (Especially in class Mesh)