To describe a node. More...
Public Member Functions | |
Node () | |
Default constructor. More... | |
Node (size_t label, const Point< real_t > &x) | |
Constructor with label and coordinates. More... | |
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. More... | |
void | setCode (const vector< int > &code) |
Define codes for all node DOFs. More... | |
void | setCode (int *code) |
Define codes for all node DOFs. More... | |
void | setCode (const string &exp, int code, size_t dof=1) |
Define code by a boolean algebraic expression invoking node coordinates. More... | |
void | setCoord (size_t i, real_t x) |
Set i-th coordinate. More... | |
void | DOF (size_t i, size_t dof) |
Define label of DOF. More... | |
void | setDOF (size_t &first_dof, size_t nb_dof) |
Define number of DOF. More... | |
void | setOnBoundary () |
Set node as boundary node. More... | |
size_t | n () const |
Return label of node. | |
size_t | getNbDOF () const |
Return number of degrees of freedom (DOF) | |
int | getCode (size_t dof=1) const |
Return code for a given DOF of node. More... | |
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. More... | |
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. More... | |
size_t | getDOF (size_t i) const |
Return label of i-th dof. | |
size_t | getNbNeigEl () const |
Return number of neighbor elements. More... | |
Element * | getNeigEl (size_t i) const |
Return i-th neighbor element. More... | |
size_t | getFirstDOF () const |
Return label of first DOF of node. | |
bool | isOnBoundary () const |
Say if node is a boundary node. More... | |
void | Add (Element *el) |
Add element pointed by el as neighbor element to node. | |
void | setLevel (int level) |
Assign a level to current node. More... | |
int | getLevel () const |
Return node level. More... | |
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 = 1 | ) | 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. |
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
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 | ( | 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 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 | ( | 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 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)