4 * Created on: 23 January. 2012
12 * Cell class is defined by
13 * - indices of nodes surounding this cell
14 * - indices of faces surounding this cell
15 * - measure of this cell
16 * - barycenter of this cell
25 public: //----------------------------------------------------------------
32 * constructor with data
33 * @param numberOfNodes : The number of nodes allocated for this cell
34 * @param numberOfFaces : The number of faces allocated for this cell
35 * @param measure : The measure of this cell
36 * @param p : The barycenter of this cell
38 Cell ( int numberOfNodes, int numberOfFaces, double measure, const Point p ) ;
42 * @param cell : The cell object to be copied
44 Cell ( const Cell& cell ) ;
52 * return number of nodes in this cell
53 * @return _numberOfNodes
55 int getNumberOfNodes ( void ) const ;
58 * return number of faces in this cell
61 int getNumberOfFaces ( void ) const ;
64 * return nodes ID in this cell
67 std::vector< int > getNodesId ( void ) const ;
70 * return faces ID in this cell
73 std::vector< int > getFacesId ( void ) const ;
76 * return cordinate numComposant of the normal vector in this cell
78 double getNormalVector ( const int numNormalVector, const int numComposant ) const ;
81 * return normal vectors in this cell
83 Vector getNormalVectors (void) const ;
86 * return the measure of this cell (length in 1D, surface in 2D or
90 double getMeasure ( void ) const ;
93 * return barrycenter in this cell
96 Point getBarryCenter ( void ) const ;
99 * return cordinate x of the barycenter in this cell
101 double x ( void ) const ;
104 * return cordinate y of the barycenter in this cell
106 double y ( void ) const ;
109 * return cordinate z of the barycenter in this cell
111 double z ( void ) const ;
114 * add a face faceId in this cell
116 void addFaceId ( int numFace, int faceId ) ;
119 * add a node nodeId in this cell
121 void addNodeId ( int numNode, int nodeId ) ;
124 * surcharge opertor =
125 * @param cell : The cell object to be copied
127 const Cell& operator= ( const Cell& cell ) ;
130 * add a normal vector numNormalVector in this cell
132 void addNormalVector ( int numNormalVector, double x, double y, double z ) ;
134 int getFaceId(int localId) const ;
136 int getNodeId(int localId) const ;
138 private: //----------------------------------------------------------------
141 * The nodes ID in this cell.
143 std::vector< int > _nodesId ;
146 * The number of nodes in this cell.
151 * The faces ID in this cell.
153 std::vector< int > _facesId ;
156 * The number of faces in this cell.
161 * The length or surface or volume of the cell.
166 * The coordinate of barycenter the cell.
171 * The coordinate of normal vector the cell.
173 Vector _normalVectors ;
176 #endif /* CELL_HXX_ */