4 * Created on: 23 janv. 2012
12 * Node class is defined by
13 * - The coordinate of the node
14 * - number of faces allocated for this node
15 * - number of cells allocated for this node
25 public: //----------------------------------------------------------------
32 * constructor with data
33 * @param numberOfCells : The number of cells allocated for this node
34 * @param numberOfFaces : The number of faces allocated for this node
35 * @param p : The barycenter of this node
37 Node ( const int numberOfCells, const int numberOfFaces, const int numberOfEdges, const Point p) ;
41 * @param node : The object to be copied
43 Node ( const Node & node ) ;
51 * return number of cells in this node
52 * @return _numberOfCells
54 int getNumberOfCells ( void ) const ;
57 * return number of faces in this node
58 * @return _numberOfFaces
60 int getNumberOfFaces ( void ) const ;
63 * return number of edges in this node
64 * @return _numberOfEdges
66 int getNumberOfEdges ( void ) const ;
69 * return The coordinate of the Node
72 Point getPoint ( void ) const ;
75 * return cordinate x of this node
77 double x ( void ) const ;
80 * return cordinate x of this node
82 double y ( void ) const ;
85 * return cordinate x of this node
87 double z ( void ) const ;
90 * return the list of group names of this node
92 std::vector<std::string> getGroupNames(void) const;
95 * return a specific group name of this node
97 std::string getGroupName(int igroup=0) const;
100 * set a groupe name for this node
102 void setGroupName(const std::string groupName);
106 * return 0 if the node is on the border of domain
109 int getRegion(void) const ;
112 * return True if the node is on the border of domain
115 bool isBorder(void) const ;
118 * @param numFace : index local of face to add in this node
119 * @param faceId : index global of face to add in this node
121 void addFaceId (const int numFace, const int faceId, const bool isBorder=false ) ;
124 * @param numCell : local index of cell to add in this node
125 * @param cellId : global index of cell to add in this node
127 void addCellId (const int numCell, const int cellId ) ;
130 * @param numNode : local index of node to add in this node neighbours
131 * @param nodeId : global index of node to add in this node neighbours
133 void addNeighbourNodeId (const int numNode, const int nodeId ) ;
136 * surcharge opertor =
137 * @param node : The node object to be copied
139 const Node& operator= ( const Node& node ) ;
142 * return Compute distance to given node
144 * @return The distance
146 double distance( const Node& n ) const ;
149 * The cells ID that this Node belongs to
152 std::vector< int > getCellsId ( void ) const ;
155 * The faces ID that this Node belongs to
158 std::vector< int > getFacesId ( void ) const ;
160 int getFaceId(int localId) const ;
163 * The neighbour nodes ID : nodes connected to this node by an edge
164 * @return _neighbourNodeId
166 std::vector< int > getNeighbourNodesId ( void ) const ;
168 int getNeighbourNodeId(int localId) const ;
170 private: //----------------------------------------------------------------
173 * The coordinate of the Node.
178 * The cells ID that this Node belongs to.
180 std::vector< int > _cellsId ;
183 * The faces ID that this Node belongs to.
185 std::vector< int > _facesId ;
188 * The neighbour nodes ID that this Node belongs to.
190 std::vector< int > _neighbourNodesId ;
193 * The number of cells allocated for this Node.
198 * The number of faces allocated for this Node.
203 * The number of edges allocated for this Node.
208 * The region of this face. -1 internal or number of edge that this face belongs to
213 * The group names of the Node.
215 std::vector<std::string> _groupNames ;
217 /* Is the node a border node ? */
221 #endif /* NODE_HXX_ */