8 #include "MEDMEM_STRING.hxx"
9 #include "MEDMEM_Exception.hxx"
10 #include "MEDMEM_define.hxx"
12 //#include "MEDMEM_Support.hxx"
13 #include "MEDMEM_Coordinate.hxx"
14 #include "MEDMEM_Connectivity.hxx"
16 // Add your own driver header (step 2)
17 #include "MEDMEM_MedMeshDriver.hxx"
18 #include "MEDMEM_MedMedDriver.hxx"
19 #include "MEDMEM_GibiMeshDriver.hxx"
21 #include "MEDMEM_VtkMeshDriver.hxx"
28 template <class T> class FIELD;
31 //class MED_MESH_RDONLY_DRIVER;
32 //class MED_MESH_WRONLY_DRIVER;
34 using namespace MED_EN;
36 /*! This class contains all the informations related with a MESH :
44 NOTE: A Family is only on one type of entity (MED_CELL, MED_FACE, MED_EDGE, MED_NODE).
45 You can't have a family on MED_CELL and MED_FACE
55 // ------- Drivers Management Part
58 //-----------------------//
60 //-----------------------//
63 virtual GENDRIVER * run(const string & fileName, MESH * ptrMesh) const = 0;
66 //-------------------------------------------------------//
67 template <class T> class INSTANCE_DE : public INSTANCE
68 //-------------------------------------------------------//
71 GENDRIVER * run(const string & fileName, MESH * ptrMesh) const
72 { return new T(fileName,ptrMesh); }
75 // Add a similar line for your personnal driver (step 3)
77 static INSTANCE_DE<MED_MESH_RDWR_DRIVER> inst_med;
78 static INSTANCE_DE<GIBI_MESH_RDWR_DRIVER> inst_gibi;
79 static INSTANCE_DE<VTK_MESH_DRIVER> inst_vtk;
81 //static INSTANCE_DE<VTK_DRIVER> inst_vtk ;
82 static const INSTANCE * const instances[];
84 // ------ End of Drivers Management Part
87 //-----------------------//
89 //-----------------------//
93 string _name; // A POSITIONNER EN FCT DES IOS ?
95 mutable COORDINATE * _coordinate;
96 mutable CONNECTIVITY * _connectivity;
102 int _numberOfNodesFamilies; //INUTILE ? -> _familyNode.size()
103 vector<FAMILY*> _familyNode; // array of size _numberOfNodesFamilies;
104 int _numberOfCellsFamilies;
105 vector<FAMILY*> _familyCell; // array of size _numberOfCellsFamilies;
106 int _numberOfFacesFamilies;
107 vector<FAMILY*> _familyFace; // array of size _numberOfFacesFamilies;
108 int _numberOfEdgesFamilies;
109 vector<FAMILY*> _familyEdge; // array of size _numberOfEdgesFamilies;
111 int _numberOfNodesGroups; //INUTILE ?
112 vector<GROUP*> _groupNode; // array of size _numberOfNodesGroups;
113 int _numberOfCellsGroups; //INUTILE ?
114 vector<GROUP*> _groupCell; // array of size _numberOfCellsGroups;
115 int _numberOfFacesGroups; //INUTILE ?
116 vector<GROUP*> _groupFace; // array of size _numberOfFacesGroups;
117 int _numberOfEdgesGroups; //INUTILE ?
118 vector<GROUP*> _groupEdge; // array of size _numberOfEdgesGroups;
121 vector<GENDRIVER *> _drivers; // Storage of the drivers currently in use
123 bool _isAGrid; // am I a GRID or not
125 //-----------------------//
127 //-----------------------//
129 // inline void checkGridFillCoords() const;
130 // inline void checkGridFillConnectivity() const;
131 bool isEmpty() const;
132 // if this->_isAGrid, assure that _coordinate and _connectivity are filled
136 // Add your personnal driver line (step 2)
137 friend class MED_MESH_RDONLY_DRIVER;
138 friend class MED_MESH_WRONLY_DRIVER;
140 friend class MED_MED_RDONLY_DRIVER;
141 friend class MED_MED_WRONLY_DRIVER;
142 friend class MED_MED_RDWR_DRIVER;
144 friend class GIBI_MESH_RDONLY_DRIVER;
145 friend class GIBI_MESH_WRONLY_DRIVER;
146 friend class GIBI_MESH_RDWR_DRIVER;
148 friend class VTK_MESH_DRIVER;
153 MESH & operator=(const MESH &m);
154 MESH( driverTypes driverType, const string & fileName="",
155 const string & meshName="") throw (MEDEXCEPTION);
157 friend ostream & operator<<(ostream &os, const MESH &my);
159 int addDriver(driverTypes driverType,
160 const string & fileName ="Default File Name.med",
161 const string & driverName="Default Mesh Name");
162 int addDriver(GENDRIVER & driver);
163 void rmDriver(int index=0);
165 virtual void read(int index=0);
166 inline void read(const MED_MED_DRIVER & genDriver);
167 inline void write(int index=0, const string & driverName = "");
168 inline void write(const MED_MED_DRIVER & genDriver);
170 // void calculateReverseConnectivity();
171 // void createFaces(); //Faces creation => full constituent informations
172 // void buildConstituent(); // calculate descendent connectivity + face-cell connectivity
175 inline void setName(string name);
177 inline string getName() const;
178 inline int getSpaceDimension() const;
179 inline int getMeshDimension() const;
180 inline bool getIsAGrid();
182 inline int getNumberOfNodes() const;
183 virtual inline const COORDINATE * getCoordinateptr() const;
184 inline string getCoordinatesSystem() const;
185 virtual inline const double * getCoordinates(medModeSwitch Mode) const;
186 virtual inline const double getCoordinate(int Number,int Axis) const;
187 inline const string * getCoordinatesNames() const;
188 inline const string * getCoordinatesUnits() const;
189 //inline int * getNodesNumbers();
191 virtual inline int getNumberOfTypes(medEntityMesh Entity) const;
192 virtual inline const medGeometryElement * getTypes(medEntityMesh Entity) const;
193 virtual inline const CELLMODEL * getCellsTypes(medEntityMesh Entity) const;
194 virtual const int * getGlobalNumberingIndex(medEntityMesh Entity) const;
195 virtual inline int getNumberOfElements(medEntityMesh Entity,
196 medGeometryElement Type) const;
197 virtual inline bool existConnectivity(medConnectivity ConnectivityType,
198 medEntityMesh Entity) const;
200 virtual inline medGeometryElement getElementType(medEntityMesh Entity,
202 virtual inline void calculateConnectivity(medModeSwitch Mode,
203 medConnectivity ConnectivityType,
204 medEntityMesh Entity) const ;
205 virtual inline const int * getConnectivity(medModeSwitch Mode,
206 medConnectivity ConnectivityType,
207 medEntityMesh Entity,
208 medGeometryElement Type) const;
209 virtual inline const int * getConnectivityIndex(medConnectivity ConnectivityType,
210 medEntityMesh Entity) const;
211 virtual int getElementNumber(medConnectivity ConnectivityType,
212 medEntityMesh Entity,
213 medGeometryElement Type,
214 int * connectivity) const;
216 virtual inline const int * getReverseConnectivity(medConnectivity ConnectivityType,
217 medEntityMesh Entity=MED_CELL) const;
218 virtual inline const int * getReverseConnectivityIndex(medConnectivity ConnectivityType,
219 medEntityMesh Entity=MED_CELL) const;
221 virtual int getNumberOfFamilies(medEntityMesh Entity) const;
222 virtual inline const vector<FAMILY*> getFamilies(medEntityMesh Entity) const;
223 virtual inline const FAMILY* getFamily(medEntityMesh Entity,int i) const;
224 virtual int getNumberOfGroups(medEntityMesh Entity) const;
225 virtual inline const vector<GROUP*> getGroups(medEntityMesh Entity) const;
226 virtual inline const GROUP* getGroup(medEntityMesh Entity,int i) const;
227 virtual inline const CONNECTIVITY* getConnectivityptr() const;
228 virtual SUPPORT * getBoundaryElements(medEntityMesh Entity)
229 throw (MEDEXCEPTION);
230 // problème avec le maillage dans le support :
231 // le pointeur n'est pas const, mais sa valeur oui. A voir !!! PG
233 SUPPORT * getSkin(const SUPPORT * Support3D)
234 throw (MEDEXCEPTION);
236 // Node DonneBarycentre(const Cell &m) const;
237 virtual FIELD<double>* getVolume (const SUPPORT * Support) const
238 throw (MEDEXCEPTION);
239 // Support must be on 3D elements
240 virtual FIELD<double>* getArea (const SUPPORT * Support) const
241 throw (MEDEXCEPTION);
242 // Support must be on 2D elements
243 virtual FIELD<double>* getLength (const SUPPORT * Support) const
244 throw (MEDEXCEPTION);
245 // Support must be on 1D elements
246 virtual FIELD<double>* getNormal (const SUPPORT * Support) const
247 throw (MEDEXCEPTION);
248 // Support must be on 2D elements
249 virtual FIELD<double>* getBarycenter (const SUPPORT * Support) const
250 throw (MEDEXCEPTION);
251 // FIELD<int>* getNeighbourhood(SUPPORT * Support) const
252 // throw (MEDEXCEPTION); // Il faut preciser !
255 return a SUPPORT pointer on the union of all SUPPORTs in Supports.
256 You should delete this pointer after use to avois memory leaks.
258 SUPPORT * mergeSupports(const vector<SUPPORT *> Supports) const throw (MEDEXCEPTION) ;
261 return a SUPPORT pointer on the intersection of all SUPPORTs in Supports.
262 The (SUPPORT *) NULL pointer is returned if the intersection is empty.
263 You should delete this pointer after use to avois memory leaks.
265 SUPPORT * intersectSupports(const vector<SUPPORT *> Supports) const throw (MEDEXCEPTION) ;
268 // ---------------------------------------
270 // ---------------------------------------
272 inline const CONNECTIVITY* MESH::getConnectivityptr() const
274 // checkGridFillConnectivity();
275 return _connectivity;
278 // inline void MESH::read(int index/*=0*/)
280 // const char * LOC = "MESH::read(int index=0) : ";
283 // if (_drivers[index]) {
284 // _drivers[index]->open();
285 // _drivers[index]->read();
286 // _drivers[index]->close();
289 // throw MED_EXCEPTION ( LOCALIZED( STRING(LOC)
290 // << "The index given is invalid, index must be between 0 and |"
291 // << _drivers.size()
297 /*! Write all the content of the MESH using driver referenced by the handler <index>*/
298 inline void MESH::write(int index/*=0*/, const string & driverName/* = ""*/)
300 const char * LOC = "MESH::write(int index=0, const string & driverName = \"\") : ";
303 if ( _drivers[index] ) {
304 _drivers[index]->open();
305 if (driverName != "") _drivers[index]->setMeshName(driverName);
306 _drivers[index]->write();
307 _drivers[index]->close();
310 throw MED_EXCEPTION ( LOCALIZED( STRING(LOC)
311 << "The index given is invalid, index must be between 0 and |"
318 // This method is MED specific : don't use it
320 inline void MESH::write(const MED_MED_DRIVER & genDriver)
322 const char * LOC = "MESH::write(const MED_MED_DRIVER & genDriver): ";
325 for (unsigned int index=0; index < _drivers.size(); index++ )
326 if ( *_drivers[index] == genDriver ) {
327 _drivers[index]->open();
328 _drivers[index]->write();
329 _drivers[index]->close();
330 // ? FINALEMENT PAS BESOIN DE L'EXCEPTION ?
337 // This method is MED specific : don't use it
339 inline void MESH::read(const MED_MED_DRIVER & genDriver)
341 const char * LOC = "MESH::read(const MED_MED_DRIVER & genDriver): ";
344 for (unsigned int index=0; index < _drivers.size(); index++ )
345 if ( *_drivers[index] == genDriver ) {
346 _drivers[index]->open();
347 _drivers[index]->read();
348 _drivers[index]->close();
349 // ? FINALEMENT PAS BESOIN DE L'EXCEPTION ?
356 /*! Set the MESH name */
357 inline void MESH::setName(string name)
359 _name=name; //NOM interne à la classe
362 /*! Get the MESH name */
363 inline string MESH::getName() const
368 /*! Get the dimension of the space */
369 inline int MESH::getSpaceDimension() const
371 return _spaceDimension;
374 /*! Get the dimension of the MESH */
375 inline int MESH::getMeshDimension() const
377 return _meshDimension;
380 /*! Get the number of nodes used in the MESH */
381 inline int MESH::getNumberOfNodes() const
383 return _numberOfNodes;
386 /*! Get the COORDINATES object. Use it only if you need COORDINATES informations not provided by the MESH class.*/
387 inline const COORDINATE * MESH::getCoordinateptr() const
389 // checkGridFillCoords();
393 /*! Get the system in which coordinates are given (CARTESIAN,CYLINDRICAL,SPHERICAL) __??MED_CART??__. */
394 inline string MESH::getCoordinatesSystem() const
396 return _coordinate->getCoordinatesSystem();
399 /*! Get the whole coordinates array in a given interlacing mode. The interlacing mode are :
400 - MED_NO_INTERLACE : X1 X2 Y1 Y2 Z1 Z2
401 - MED_FULL_INTERLACE : X1 Y1 Z1 X2 Y2 Z2
403 inline const double * MESH::getCoordinates(medModeSwitch Mode) const
405 // checkGridFillCoords();
406 return _coordinate->getCoordinates(Mode);
409 /*! Get the coordinate n° number on axis n°axis*/
410 inline const double MESH::getCoordinate(int number, int axis) const
412 // checkGridFillCoords();
413 return _coordinate->getCoordinate(number,axis);
416 /*! Get the coordinate names array ("x ","y ","z ")
417 of size n*MED_TAILLE_PNOM
419 inline const string * MESH::getCoordinatesNames() const
421 return _coordinate->getCoordinatesNames();
424 /*! Get the coordinate unit names array ("cm ","cm ","cm ")
425 of size n*MED_TAILLE_PNOM
427 inline const string * MESH::getCoordinatesUnits() const
429 return _coordinate->getCoordinatesUnits();
431 // int * MESH::getNodesNumbers() const
433 // return nodesNumbers;
436 /*! Get the number of different geometric types for a given entity type.
438 For exemple getNumberOfTypes(MED_CELL) would return 3 if the MESH
439 have some MED_TETRA4, MED_PYRA5 and MED_HEXA6 in it.
441 medEntityMesh entity : MED_CELL, MED_FACE, MED_EDGE, MED_NODE, MED_ALL_ENTITIES
443 If entity is not defined, return 0.
445 If there is no connectivity, return an exception.
447 inline int MESH::getNumberOfTypes(medEntityMesh entity) const
449 MESSAGE("MESH::getNumberOfTypes(medEntityMesh entity) : "<<entity);
450 if (entity == MED_NODE)
452 // checkGridFillConnectivity();
453 if (_connectivity != NULL)
454 return _connectivity->getNumberOfTypes(entity);
455 throw MEDEXCEPTION(LOCALIZED("MESH::getNumberOfTypes( medEntityMesh ) : Connectivity not defined !"));
459 Get the list of geometric types used by a given entity.
460 medEntityMesh entity : MED_CELL, MED_FACE, MED_EDGE, MED_ALL_ENTITIES
462 REM : Don't use MED_NODE
464 If entity is not defined, return an exception.
466 inline const medGeometryElement * MESH::getTypes(medEntityMesh entity) const
468 if (entity == MED_NODE)
469 throw MEDEXCEPTION(LOCALIZED("MESH::getTypes( medEntityMesh ) : No medGeometryElement with MED_NODE entity !"));
470 // return un tableau de taille 1 contenant MED_NONE, comme les supports pour etre coherent avec getNumberOfTypes ???? PG
472 // checkGridFillConnectivity();
473 if (_connectivity != NULL)
474 return _connectivity->getGeometricTypes(entity);
475 throw MEDEXCEPTION(LOCALIZED("MESH::getTypes( medEntityMesh ) : Connectivity not defined !"));
479 Get the whole list of CELLMODEL used by cells of given type (medEntityMesh).
481 REMARK : Don't use MED_NODE as medEntityMesh
483 inline const CELLMODEL * MESH::getCellsTypes(medEntityMesh Entity) const
485 // checkGridFillConnectivity();
486 if (_connectivity != NULL)
487 return _connectivity->getCellsTypes(Entity);
488 throw MEDEXCEPTION(LOCALIZED("MESH::getCellsTypes( medEntityMesh ) : Connectivity not defined !"));
491 /*! Return an array of size NumbreOfTypes+1 which contains, for each
492 geometric type of the given entity, the first global element number
495 For exemple, if we have a mesh with 5 triangles and 4 quadrangle :
496 - size of GlobalNumberingIndex is 3
497 - GlobalNumberingIndex[0]=1 (the first type)
498 - GlobalNumberingIndex[1]=6 (the second type)
499 - GlobalNumberingIndex[2]=10
501 inline const int * MESH::getGlobalNumberingIndex(medEntityMesh entity) const
503 // checkGridFillConnectivity();
504 if (_connectivity != NULL)
505 return _connectivity->getGlobalNumberingIndex(entity);
506 throw MEDEXCEPTION(LOCALIZED("MESH::getNumberOfTypes( medEntityMesh ) : Connectivity not defined !"));
509 Return the number of element of given geometric type of given entity. Return 0 if query is not defined.
512 - getNumberOfElements(MED_NODE,MED_NONE) : number of node
513 - getNumberOfElements(MED_NODE,MED_TRIA3) : return 0 (not defined)
514 - getNumberOfElements(MED_FACE,MED_TRIA3) : return number of triangles
515 elements defined in face entity (0 if not defined)
516 - getNumberOfElements(MED_CELL,MED_ALL_ELEMENTS) : return total number
517 of elements defined in cell entity
519 inline int MESH::getNumberOfElements(medEntityMesh entity, medGeometryElement Type) const
521 // const char * LOC = "MESH::getNumberOfElements(medEntityMesh,medGeometryElement) : ";
522 if (entity==MED_NODE)
523 if ((Type==MED_NONE)|(Type==MED_ALL_ELEMENTS))
524 return _numberOfNodes;
527 //throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<"wrong medGeometryElement with MED_NODE"));
530 // checkGridFillConnectivity();
531 if (_connectivity != (CONNECTIVITY*)NULL)
532 return _connectivity->getNumberOf(entity,Type);
535 //throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<"connectivity not defined !"));
539 Return true if the wanted connectivity exist, else return false
540 (to use before a getSomething method).
542 inline bool MESH::existConnectivity(medConnectivity connectivityType, medEntityMesh entity) const
544 // checkGridFillConnectivity();
545 if (_connectivity==(CONNECTIVITY*)NULL)
546 throw MEDEXCEPTION("MESH::existConnectivity(medConnectivity,medEntityMesh) : no connectivity defined !");
547 return _connectivity->existConnectivity(connectivityType,entity);
550 Return the geometric type of global element Number of entity Entity.
552 Throw an exception if Entity is not defined or Number are wrong (too big).
554 inline medGeometryElement MESH::getElementType(medEntityMesh Entity,int Number) const
556 // checkGridFillConnectivity();
557 if (_connectivity==(CONNECTIVITY*)NULL)
558 throw MEDEXCEPTION("MESH::getElementType(medEntityMesh,int) : no connectivity defined !");
559 return _connectivity->getElementType(Entity,Number);
562 Calculate the ask connectivity. Return an exception if this could not be
563 done. Do nothing if connectivity already exist.
566 inline void MESH::calculateConnectivity(medModeSwitch Mode,medConnectivity ConnectivityType,medEntityMesh entity) const
568 // checkGridFillConnectivity();
569 if (Mode==MED_FULL_INTERLACE)
570 _connectivity->calculateConnectivity(ConnectivityType,entity);
572 throw MEDEXCEPTION(LOCALIZED("MESH::calculateConnectivity : only for MED_FULL_INTERLACE mode"));
575 Return the required connectivity in the right mode for the given
576 geometric type of the given entity.
578 To get connectivity for all geometric type, use Mode=MED_FULL_INTERLACE
579 and Type=MED_ALL_ELEMENTS.
580 You must also get the corresponding index array.
582 inline const int * MESH::getConnectivity(medModeSwitch Mode,medConnectivity ConnectivityType,medEntityMesh entity, medGeometryElement Type) const
584 // checkGridFillConnectivity();
585 if (Mode==MED_FULL_INTERLACE)
586 return _connectivity->getConnectivity(ConnectivityType,entity,Type);
587 throw MEDEXCEPTION(LOCALIZED("MESH::getConnectivity : only for MED_FULL_INTERLACE mode"));
590 Return the required index array for a connectivity received in
591 MED_FULL_ENTERLACE mode and MED_ALL_ELEMENTS type.
593 This array allow to find connectivity of each elements.
595 Example : Connectivity of i^{th} elements (1<=i<=NumberOfElement) begin
596 at index ConnectivityIndex[i-1] and end at index ConnectivityIndex[i]-1
597 in Connectivity array (Connectivity[ConnectivityIndex[i-1]-1] is the
600 inline const int * MESH::getConnectivityIndex(medConnectivity ConnectivityType,medEntityMesh entity) const
602 // checkGridFillConnectivity();
603 return _connectivity->getConnectivityIndex(ConnectivityType, entity);
606 Return the reverse connectivity required by ConnectivityType :
607 - If ConnectivityType=MED_NODAL : return connectivity node-cell
608 - If ConnectivityType=MED_DESCENDING : return connectivity face-cell
610 You must get ReverseConnectivityIndex array to use it.
612 inline const int * MESH::getReverseConnectivity(medConnectivity ConnectivityType,medEntityMesh Entity/*=MED_CELL*/) const
614 // checkGridFillConnectivity();
615 if (NULL==_connectivity)
616 throw MEDEXCEPTION("MESH::getReverseConnectivity : no connectivity defined in MESH !");
618 return _connectivity->getReverseConnectivity(ConnectivityType,Entity);
621 Return the index array required by ConnectivityType.
623 This array allow to find reverse connectivity of each elements.
625 Example : Reverse connectivity of i^{th} elements (1<=i<=NumberOfElement)
626 begin at index ReverseConnectivityIndex[i-1] and end at index
627 ReverseConnectivityIndex[i]-1
628 in ReverseConnectivity array (
629 ReverseConnectivity[ReverseConnectivityIndex[i-1]-1]
632 inline const int * MESH::getReverseConnectivityIndex(medConnectivity ConnectivityType,medEntityMesh Entity/*=MED_CELL*/) const
634 // checkGridFillConnectivity();
635 if (NULL==_connectivity)
636 throw MEDEXCEPTION("MESH::getReverseConnectivityIndex : no connectivity defined in MESH !");
638 return _connectivity->getReverseConnectivityIndex(ConnectivityType,Entity);
642 inline int MESH::getNumberOfFamilies (medEntityMesh entity) const
646 return _numberOfNodesFamilies;
648 return _numberOfCellsFamilies;
650 return _numberOfFacesFamilies;
652 return _numberOfEdgesFamilies;
654 throw MEDEXCEPTION("MESH::getNumberOfFamilies : Unknown entity");
657 inline int MESH::getNumberOfGroups (medEntityMesh entity) const
661 return _numberOfNodesGroups;
663 return _numberOfCellsGroups;
665 return _numberOfFacesGroups;
667 return _numberOfEdgesGroups;
669 throw MEDEXCEPTION("MESH::getNumberOfGroups : Unknown entity");
672 const vector<FAMILY*> MESH::getFamilies(medEntityMesh entity) const
684 throw MEDEXCEPTION("MESH::getFamilies : Unknown entity");
688 const vector<GROUP*> MESH::getGroups(medEntityMesh entity) const
700 throw MEDEXCEPTION("MESH::getGroups : Unknown entity");
704 const FAMILY* MESH::getFamily(medEntityMesh entity, int i) const
707 throw MEDEXCEPTION("MESH::getFamily(i) : argument i must be > 0");
708 int NumberOfFamilies = 0;
709 vector<FAMILY*> Family;
712 NumberOfFamilies = _numberOfNodesFamilies;
713 Family = _familyNode;
717 NumberOfFamilies = _numberOfCellsFamilies;
718 Family = _familyCell;
722 NumberOfFamilies = _numberOfFacesFamilies;
723 Family = _familyFace;
727 NumberOfFamilies = _numberOfEdgesFamilies;
728 Family = _familyEdge;
732 throw MEDEXCEPTION("MESH::getFamilies : Unknown entity");
734 if (i>NumberOfFamilies)
735 throw MEDEXCEPTION("MESH::getFamily(entity,i) : argument i must be <= _numberOfFamilies");
739 const GROUP* MESH::getGroup(medEntityMesh entity, int i) const
741 const char * LOC = "MESH::getGroup(medEntityMesh entity, int i) : ";
743 throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<"argument i must be > 0"));
744 int NumberOfGroups = 0;
745 vector<GROUP*> Group;
748 NumberOfGroups = _numberOfNodesGroups;
753 NumberOfGroups = _numberOfCellsGroups;
758 NumberOfGroups = _numberOfFacesGroups;
763 NumberOfGroups = _numberOfEdgesGroups;
768 throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<"Unknown entity"));
770 if (i>NumberOfGroups)
771 throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<"argument i="<<i<<" must be <= _numberOfGroups="<<NumberOfGroups));
780 //inline void MESH::write(const string & driverName) {
781 // write(0,driverName);
784 inline bool MESH::getIsAGrid()
791 #endif /* MESH_HXX */