Class to construct a list of nodes having some common properties. More...

#include <MeshExtract.h>

Public Member Functions

 NodeList (Mesh &ms)
 Constructor using a Mesh instance.
 
 ~NodeList ()
 Destructor.
 
void selectCode (int code, int dof=1)
 Select nodes having a given code for a given degree of freedom.
 
void unselectCode (int code, int dof=1)
 Unselect nodes having a given code for a given degree of freedom.
 
void selectCoordinate (real_t x, real_t y=ANY, real_t z=ANY)
 Select nodes having given coordinates.
 
size_t getNbNodes () const
 Return number of selected nodes.
 
void top ()
 Reset list of nodes at its top position (Non constant version)
 
void top () const
 Reset list of nodes at its top position (Constant version)
 
Nodeget ()
 Return pointer to current node and move to next one (Non constant version)
 
Nodeget () const
 Return pointer to current node and move to next one (Constant version)
 

Detailed Description

Class to construct a list of nodes having some common properties.

This class enables choosing multiple selection criteria by using function select... However, the intersection of these properties must be empty.

Author
Rachid Touzani

Member Function Documentation

◆ selectCode()

void selectCode ( int  code,
int  dof = 1 
)

Select nodes having a given code for a given degree of freedom.

Parameters
[in]codeCode that nodes share
[in]dofDegree of Freedom label [Default: 1]

◆ selectCoordinate()

void selectCoordinate ( real_t  x,
real_t  y = ANY,
real_t  z = ANY 
)

Select nodes having given coordinates.

Parameters
[in]xx-coordinate that share the selected nodes
[in]yy-coordinate that share the selected nodes [Default: ANY]
[in]zz-coordinate that share the selected nodes [Default: ANY]

Coordinates can be assigned the value ANY. This means that any coordinate value is accepted. For instance, to select all nodes with x=0, use selectCoordinate(0.,ANY,ANY);

◆ unselectCode()

void unselectCode ( int  code,
int  dof = 1 
)

Unselect nodes having a given code for a given degree of freedom.

Parameters
[in]codeCode of nodes to exclude
[in]dofDegree of Freedom label [Default: 1]