(9)

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_tgetCoord () 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_tgetXYZ () 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...
 
ElementgetNeigEl (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...
 

Detailed Description

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.

Remarks
Once the mesh is constructed, information on neighboring elements of node can be retrieved (see appropriate member functions). However, the member function getNodeNeighborElements of Mesh must have been called before. If this is not the case, the program crashes down since no preliminary checking is done for efficiency reasons.

Constructor & Destructor Documentation

◆ Node() [1/2]

Node ( )

Default constructor.

Initialize data to zero

◆ Node() [2/2]

Node ( size_t  label,
const Point< real_t > &  x 
)

Constructor with label and coordinates.

Parameters
[in]labelLabel of node
[in]xNode coordinates

Member Function Documentation

◆ DOF()

void DOF ( size_t  i,
size_t  dof 
)

Define label of DOF.

Parameters
[in]iDOF index
[in]dofLabel of DOF

◆ getCode()

int getCode ( size_t  dof = 1) const

Return code for a given DOF of node.

Parameters
[in]doflabel of degree of freedom for which code is to be returned. Default value is 1.

◆ getCoord()

Point<real_t> getCoord ( ) const

Return coordinates of node.

Return value is an instance of class Point

◆ getLevel()

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

◆ getNbNeigEl()

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

◆ getNeigEl()

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

◆ getXYZ()

Point<real_t> getXYZ ( ) const

Return coordinates of node.

Return value is an instance of class Point

◆ isOnBoundary()

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).

◆ setCode() [1/4]

void setCode ( size_t  dof,
int  code 
)

Define code for a given DOF of node.

Parameters
[in]dofDOF index
[in]codeCode to assign to DOF

◆ setCode() [2/4]

void setCode ( const vector< int > &  code)

Define codes for all node DOFs.

Parameters
[in]codevector instance that contains code for each DOF of current node

◆ setCode() [3/4]

void setCode ( int *  code)

Define codes for all node DOFs.

Parameters
[in]codeC-array that contains code for each DOF of current node

◆ setCode() [4/4]

void setCode ( const string &  exp,
int  code,
size_t  dof = 1 
)

Define code by a boolean algebraic expression invoking node coordinates.

Parameters
[in]expBoolean algebraic expression as required by fparser
[in]codeCode to assign to node if the algebraic expression is true
[in]dofDegree of Freedom for which code is assigned [Default: 1]

◆ setCoord()

void setCoord ( size_t  i,
real_t  x 
)

Set i-th coordinate.

Parameters
[in]iCoordinate index (1..3)
[in]xCoordinate value

◆ setDOF()

void setDOF ( size_t &  first_dof,
size_t  nb_dof 
)

Define number of DOF.

Parameters
[in,out]first_dofLabel of the first DOF in input that is actualized
[in]nb_dofNumber of DOF

◆ setLevel()

void setLevel ( int  level)

Assign a level to current node.

This member function is useful for mesh adaption.
Default node's level is zero

◆ setOnBoundary()

void setOnBoundary ( )

Set node as boundary node.

This function is mostly internally used (Especially in class Mesh)