9 #include "MEDMEM_STRING.hxx"
10 #include "MEDMEM_Exception.hxx"
11 #include "MEDMEM_define.hxx"
13 //#include "MEDMEM_Support.hxx"
14 #include "MEDMEM_Coordinate.hxx"
15 #include "MEDMEM_Connectivity.hxx"
17 // Add your own driver header (step 2)
18 #include "MEDMEM_MedMeshDriver.hxx"
19 #include "MEDMEM_MedMedDriver.hxx"
20 #include "MEDMEM_GibiMeshDriver.hxx"
21 #include "MEDMEM_PorflowMeshDriver.hxx"
23 #include "MEDMEM_VtkMeshDriver.hxx"
28 //class MED_MESH_RDONLY_DRIVER;
29 //class MED_MESH_WRONLY_DRIVER;
31 using namespace MED_EN;
33 /*! This class contains all the informations related with a MESH :
41 NOTE: A Family is only on one type of entity (MED_CELL, MED_FACE, MED_EDGE, MED_NODE).
42 You can't have a family on MED_CELL and MED_FACE
48 template <class T> class FIELD;
61 // ------- Drivers Management Part
64 //-----------------------//
66 //-----------------------//
69 virtual GENDRIVER * run(const string & fileName, MESH * ptrMesh) const = 0;
72 //-------------------------------------------------------//
73 template <class T> class INSTANCE_DE : public INSTANCE
74 //-------------------------------------------------------//
77 GENDRIVER * run(const string & fileName, MESH * ptrMesh) const
78 { return new T(fileName,ptrMesh); }
81 // Add a similar line for your personnal driver (step 3)
83 static INSTANCE_DE<MED_MESH_RDWR_DRIVER> inst_med;
84 static INSTANCE_DE<GIBI_MESH_RDWR_DRIVER> inst_gibi;
85 static INSTANCE_DE<PORFLOW_MESH_RDWR_DRIVER> inst_porflow;
86 static INSTANCE_DE<VTK_MESH_DRIVER> inst_vtk;
88 //static INSTANCE_DE<VTK_DRIVER> inst_vtk ;
89 static const INSTANCE * const instances[];
91 // ------ End of Drivers Management Part
94 //-----------------------//
96 //-----------------------//
100 string _name; // A POSITIONNER EN FCT DES IOS ?
103 mutable COORDINATE * _coordinate;
104 mutable CONNECTIVITY * _connectivity;
111 //////////////////////////////////////////////////////////////////////////////////////
112 /// Modification pour prise en compte de la numérotation optionnelle des noeuds ///
113 //////////////////////////////////////////////////////////////////////////////////////
115 /// La map suivante donne le lien numérotation optionnelle => numérotation cannonique
116 /// Elle sera calculée apres l'appel de MEDnumLire(...)
117 /// Et sera utilisée avant chaque appel a MEDconnLire(...) pour renuméroter toutes les mailles de façon canonique [1...n]
118 /// _coordinate->NodeNumber sera utilisé avant chaque appel à MEDconnEcri pour démunéroter les mailles en leur numérotation originelle
119 /// Ce traitement devrait prévenir tout plantage du aux numérotations optionnelles DES NOEUDS
120 /// Et ne ralentira que tres peu les traitements sans numéros optionnels
122 int _arePresentOptionnalNodesNumbers;
123 map<int,int> _optionnalToCanonicNodesNumbers;
125 vector<FAMILY*> _familyNode;
126 vector<FAMILY*> _familyCell;
127 vector<FAMILY*> _familyFace;
128 vector<FAMILY*> _familyEdge;
130 vector<GROUP*> _groupNode;
131 vector<GROUP*> _groupCell;
132 vector<GROUP*> _groupFace;
133 vector<GROUP*> _groupEdge;
136 vector<GENDRIVER *> _drivers; // Storage of the drivers currently in use
138 bool _isAGrid; // am I a GRID or not
140 //-----------------------//
142 //-----------------------//
144 // inline void checkGridFillCoords() const;
145 // inline void checkGridFillConnectivity() const;
146 bool isEmpty() const;
147 // if this->_isAGrid, assure that _coordinate and _connectivity are filled
151 // Add your personnal driver line (step 2)
152 friend class MED_MESH_RDONLY_DRIVER;
153 friend class MED_MESH_WRONLY_DRIVER;
155 friend class MED_MED_RDONLY_DRIVER;
156 friend class MED_MED_WRONLY_DRIVER;
157 friend class MED_MED_RDWR_DRIVER;
159 friend class GIBI_MESH_RDONLY_DRIVER;
160 friend class GIBI_MESH_WRONLY_DRIVER;
161 friend class GIBI_MESH_RDWR_DRIVER;
163 friend class PORFLOW_MESH_RDONLY_DRIVER;
164 friend class PORFLOW_MESH_WRONLY_DRIVER;
165 friend class PORFLOW_MESH_RDWR_DRIVER;
167 friend class VTK_MESH_DRIVER;
172 MESH & operator=(const MESH &m);
173 MESH( driverTypes driverType, const string & fileName="",
174 const string & meshName="") throw (MEDEXCEPTION);
176 friend ostream & operator<<(ostream &os, const MESH &my);
178 int addDriver(driverTypes driverType,
179 const string & fileName ="Default File Name.med",
180 const string & driverName="Default Mesh Name");
181 int addDriver(GENDRIVER & driver);
182 void rmDriver(int index=0);
184 virtual void read(int index=0);
185 inline void read(const MED_MED_DRIVER & genDriver);
186 inline void write(int index=0, const string & driverName = "");
187 inline void write(const MED_MED_DRIVER & genDriver);
189 // void calculateReverseConnectivity();
190 // void createFaces(); //Faces creation => full constituent informations
191 // void buildConstituent(); // calculate descendent connectivity + face-cell connectivity
194 inline void setName(string name);
195 inline void setDescription(string description);
196 inline string getName() const;
197 inline string getDescription() const;
198 inline int getSpaceDimension() const;
199 inline int getMeshDimension() const;
200 inline bool getIsAGrid();
202 inline int getNumberOfNodes() const;
203 virtual inline const COORDINATE * getCoordinateptr() const;
204 inline string getCoordinatesSystem() const;
205 virtual inline const double * getCoordinates(medModeSwitch Mode) const;
206 virtual inline const double getCoordinate(int Number,int Axis) const;
207 inline const string * getCoordinatesNames() const;
208 inline const string * getCoordinatesUnits() const;
209 //inline int * getNodesNumbers();
211 virtual inline int getNumberOfTypes(medEntityMesh Entity) const;
212 virtual inline const medGeometryElement * getTypes(medEntityMesh Entity) const;
213 virtual inline const CELLMODEL * getCellsTypes(medEntityMesh Entity) const;
214 virtual const int * getGlobalNumberingIndex(medEntityMesh Entity) const;
215 virtual inline int getNumberOfElements(medEntityMesh Entity,
216 medGeometryElement Type) const;
217 virtual inline bool existConnectivity(medConnectivity ConnectivityType,
218 medEntityMesh Entity) const;
220 virtual inline medGeometryElement getElementType(medEntityMesh Entity,
222 virtual inline void calculateConnectivity(medModeSwitch Mode,
223 medConnectivity ConnectivityType,
224 medEntityMesh Entity) const ;
225 virtual inline const int * getConnectivity(medModeSwitch Mode,
226 medConnectivity ConnectivityType,
227 medEntityMesh Entity,
228 medGeometryElement Type) const;
229 virtual inline const int * getConnectivityIndex(medConnectivity ConnectivityType,
230 medEntityMesh Entity) const;
231 virtual int getElementNumber(medConnectivity ConnectivityType,
232 medEntityMesh Entity,
233 medGeometryElement Type,
234 int * connectivity) const;
236 virtual inline const int * getReverseConnectivity(medConnectivity ConnectivityType,
237 medEntityMesh Entity=MED_CELL) const;
238 virtual inline const int * getReverseConnectivityIndex(medConnectivity ConnectivityType,
239 medEntityMesh Entity=MED_CELL) const;
241 virtual int getNumberOfFamilies(medEntityMesh Entity) const;
242 virtual inline const vector<FAMILY*> getFamilies(medEntityMesh Entity) const;
243 virtual inline const FAMILY* getFamily(medEntityMesh Entity,int i) const;
244 virtual int getNumberOfGroups(medEntityMesh Entity) const;
245 virtual inline const vector<GROUP*> getGroups(medEntityMesh Entity) const;
246 virtual inline const GROUP* getGroup(medEntityMesh Entity,int i) const;
247 virtual inline const CONNECTIVITY* getConnectivityptr() const;
248 virtual SUPPORT * getBoundaryElements(medEntityMesh Entity)
249 throw (MEDEXCEPTION);
250 // problème avec le maillage dans le support :
251 // le pointeur n'est pas const, mais sa valeur oui. A voir !!! PG
253 SUPPORT * getSkin(const SUPPORT * Support3D)
254 throw (MEDEXCEPTION);
256 // Node DonneBarycentre(const Cell &m) const;
257 virtual FIELD<double>* getVolume (const SUPPORT * Support) const
258 throw (MEDEXCEPTION);
259 // Support must be on 3D elements
260 virtual FIELD<double>* getArea (const SUPPORT * Support) const
261 throw (MEDEXCEPTION);
262 // Support must be on 2D elements
263 virtual FIELD<double>* getLength (const SUPPORT * Support) const
264 throw (MEDEXCEPTION);
265 // Support must be on 1D elements
266 virtual FIELD<double>* getNormal (const SUPPORT * Support) const
267 throw (MEDEXCEPTION);
268 // Support must be on 2D elements
269 virtual FIELD<double>* getBarycenter (const SUPPORT * Support) const
270 throw (MEDEXCEPTION);
271 // FIELD<int>* getNeighbourhood(SUPPORT * Support) const
272 // throw (MEDEXCEPTION); // Il faut preciser !
275 return a SUPPORT pointer on the union of all SUPPORTs in Supports.
276 You should delete this pointer after use to avois memory leaks.
278 SUPPORT * mergeSupports(const vector<SUPPORT *> Supports) const throw (MEDEXCEPTION) ;
281 return a SUPPORT pointer on the intersection of all SUPPORTs in Supports.
282 The (SUPPORT *) NULL pointer is returned if the intersection is empty.
283 You should delete this pointer after use to avois memory leaks.
285 SUPPORT * intersectSupports(const vector<SUPPORT *> Supports) const throw (MEDEXCEPTION) ;
288 * Create families from groups.
289 * This function is automaticaly called whenever we ask for families that are not up-to-date.
290 * (The creation of families is delayed to the need of user.)
291 * If a new created family hapen to already exist, we keep the old one.
292 * (There is no way to know which family has change.)
294 void createFamilies();
298 using namespace MEDMEM;
299 // ---------------------------------------
301 // ---------------------------------------
303 inline const CONNECTIVITY* MESH::getConnectivityptr() const
305 // checkGridFillConnectivity();
306 return _connectivity;
309 // inline void MESH::read(int index/*=0*/)
311 // const char * LOC = "MESH::read(int index=0) : ";
314 // if (_drivers[index]) {
315 // _drivers[index]->open();
316 // _drivers[index]->read();
317 // _drivers[index]->close();
320 // throw MED_EXCEPTION ( LOCALIZED( STRING(LOC)
321 // << "The index given is invalid, index must be between 0 and |"
322 // << _drivers.size()
328 /*! Write all the content of the MESH using driver referenced by the integer handler index.*/
329 inline void MESH::write(int index/*=0*/, const string & driverName/* = ""*/)
331 const char * LOC = "MESH::write(int index=0, const string & driverName = \"\") : ";
334 if ( _drivers[index] ) {
335 _drivers[index]->open();
336 if (driverName != "") _drivers[index]->setMeshName(driverName);
337 _drivers[index]->write();
338 _drivers[index]->close();
341 throw MED_EXCEPTION ( LOCALIZED( STRING(LOC)
342 << "The index given is invalid, index must be between 0 and |"
349 // This method is MED specific : don't use it
351 inline void MESH::write(const MED_MED_DRIVER & genDriver)
353 const char * LOC = "MESH::write(const MED_MED_DRIVER & genDriver): ";
356 for (unsigned int index=0; index < _drivers.size(); index++ )
357 if ( *_drivers[index] == genDriver ) {
358 _drivers[index]->open();
359 _drivers[index]->write();
360 _drivers[index]->close();
361 // ? FINALEMENT PAS BESOIN DE L'EXCEPTION ?
368 // This method is MED specific : don't use it
370 inline void MESH::read(const MED_MED_DRIVER & genDriver)
372 const char * LOC = "MESH::read(const MED_MED_DRIVER & genDriver): ";
375 for (unsigned int index=0; index < _drivers.size(); index++ )
376 if ( *_drivers[index] == genDriver ) {
377 _drivers[index]->open();
378 _drivers[index]->read();
379 _drivers[index]->close();
380 // ? FINALEMENT PAS BESOIN DE L'EXCEPTION ?
387 /*! Set the MESH name */
388 inline void MESH::setName(string name)
390 _name=name; //NOM interne à la classe
393 /*! Get the MESH name */
394 inline string MESH::getName() const
399 /*! Set the MESH description */
400 inline void MESH::setDescription(string description)
402 _description=description; //NOM interne à la classe
405 /*! Get the MESH description */
406 inline string MESH::getDescription() const
411 /*! Get the dimension of the space */
412 inline int MESH::getSpaceDimension() const
414 return _spaceDimension;
417 /*! Get the dimension of the MESH */
418 inline int MESH::getMeshDimension() const
420 return _meshDimension;
423 /*! Get the number of nodes used in the MESH */
424 inline int MESH::getNumberOfNodes() const
426 return _numberOfNodes;
429 /*! Get the COORDINATES object. Use it only if you need COORDINATES informations not provided by the MESH class.*/
430 inline const COORDINATE * MESH::getCoordinateptr() const
432 // checkGridFillCoords();
436 /*! Get the system in which coordinates are given (CARTESIAN,CYLINDRICAL,SPHERICAL) __??MED_CART??__. */
437 inline string MESH::getCoordinatesSystem() const
439 return _coordinate->getCoordinatesSystem();
442 /*! Get the whole coordinates array in a given interlacing mode. The interlacing mode are :
443 - MED_NO_INTERLACE : X1 X2 Y1 Y2 Z1 Z2
444 - MED_FULL_INTERLACE : X1 Y1 Z1 X2 Y2 Z2
446 inline const double * MESH::getCoordinates(medModeSwitch Mode) const
448 // checkGridFillCoords();
449 return _coordinate->getCoordinates(Mode);
452 /*! Get the coordinate n° number on axis n°axis*/
453 inline const double MESH::getCoordinate(int number, int axis) const
455 // checkGridFillCoords();
456 return _coordinate->getCoordinate(number,axis);
459 /*! Get the coordinate names array ("x ","y ","z ")
460 of size n*MED_TAILLE_PNOM
462 inline const string * MESH::getCoordinatesNames() const
464 return _coordinate->getCoordinatesNames();
467 /*! Get the coordinate unit names array ("cm ","cm ","cm ")
468 of size n*MED_TAILLE_PNOM
470 inline const string * MESH::getCoordinatesUnits() const
472 return _coordinate->getCoordinatesUnits();
474 // int * MESH::getNodesNumbers() const
476 // return nodesNumbers;
479 /*! Get the number of different geometric types for a given entity type.
481 For exemple getNumberOfTypes(MED_CELL) would return 3 if the MESH
482 have some MED_TETRA4, MED_PYRA5 and MED_HEXA6 in it.
484 medEntityMesh entity : MED_CELL, MED_FACE, MED_EDGE, MED_NODE, MED_ALL_ENTITIES
486 If entity is not defined, return 0.
488 If there is no connectivity, return an exception.
490 inline int MESH::getNumberOfTypes(medEntityMesh entity) const
492 MESSAGE("MESH::getNumberOfTypes(medEntityMesh entity) : "<<entity);
493 if (entity == MED_NODE)
495 // checkGridFillConnectivity();
496 if (_connectivity != NULL)
497 return _connectivity->getNumberOfTypes(entity);
498 throw MEDEXCEPTION(LOCALIZED("MESH::getNumberOfTypes( medEntityMesh ) : Connectivity not defined !"));
502 Get the list of geometric types used by a given entity.
503 medEntityMesh entity : MED_CELL, MED_FACE, MED_EDGE, MED_ALL_ENTITIES
505 REM : Don't use MED_NODE
507 If entity is not defined, return an exception.
509 inline const medGeometryElement * MESH::getTypes(medEntityMesh entity) const
511 if (entity == MED_NODE)
512 throw MEDEXCEPTION(LOCALIZED("MESH::getTypes( medEntityMesh ) : No medGeometryElement with MED_NODE entity !"));
513 // return un tableau de taille 1 contenant MED_NONE, comme les supports pour etre coherent avec getNumberOfTypes ???? PG
515 // checkGridFillConnectivity();
516 if (_connectivity != NULL)
517 return _connectivity->getGeometricTypes(entity);
518 throw MEDEXCEPTION(LOCALIZED("MESH::getTypes( medEntityMesh ) : Connectivity not defined !"));
522 Get the whole list of CELLMODEL used by cells of given type (medEntityMesh).
524 REMARK : Don't use MED_NODE as medEntityMesh
526 inline const CELLMODEL * MESH::getCellsTypes(medEntityMesh Entity) const
528 // checkGridFillConnectivity();
529 if (_connectivity != NULL)
530 return _connectivity->getCellsTypes(Entity);
531 throw MEDEXCEPTION(LOCALIZED("MESH::getCellsTypes( medEntityMesh ) : Connectivity not defined !"));
534 /*! Return an array of size NumbreOfTypes+1 which contains, for each
535 geometric type of the given entity, the first global element number
538 For exemple, if we have a mesh with 5 triangles and 4 quadrangle :
539 - size of GlobalNumberingIndex is 3
540 - GlobalNumberingIndex[0]=1 (the first type)
541 - GlobalNumberingIndex[1]=6 (the second type)
542 - GlobalNumberingIndex[2]=10
544 inline const int * MESH::getGlobalNumberingIndex(medEntityMesh entity) const
546 // checkGridFillConnectivity();
547 if (_connectivity != NULL)
548 return _connectivity->getGlobalNumberingIndex(entity);
549 throw MEDEXCEPTION(LOCALIZED("MESH::getNumberOfTypes( medEntityMesh ) : Connectivity not defined !"));
552 Return the number of element of given geometric type of given entity. Return 0 if query is not defined.
555 - getNumberOfElements(MED_NODE,MED_NONE) : number of node
556 - getNumberOfElements(MED_NODE,MED_TRIA3) : return 0 (not defined)
557 - getNumberOfElements(MED_FACE,MED_TRIA3) : return number of triangles
558 elements defined in face entity (0 if not defined)
559 - getNumberOfElements(MED_CELL,MED_ALL_ELEMENTS) : return total number
560 of elements defined in cell entity
562 inline int MESH::getNumberOfElements(medEntityMesh entity, medGeometryElement Type) const
564 // const char * LOC = "MESH::getNumberOfElements(medEntityMesh,medGeometryElement) : ";
565 if (entity==MED_NODE)
566 if ((Type==MED_NONE)|(Type==MED_ALL_ELEMENTS))
567 return _numberOfNodes;
570 //throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<"wrong medGeometryElement with MED_NODE"));
573 // checkGridFillConnectivity();
574 if (_connectivity != (CONNECTIVITY*)NULL)
575 return _connectivity->getNumberOf(entity,Type);
578 //throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<"connectivity not defined !"));
582 Return true if the wanted connectivity exist, else return false
583 (to use before a getSomething method).
585 inline bool MESH::existConnectivity(medConnectivity connectivityType, medEntityMesh entity) const
587 // checkGridFillConnectivity();
588 if (_connectivity==(CONNECTIVITY*)NULL)
589 throw MEDEXCEPTION("MESH::existConnectivity(medConnectivity,medEntityMesh) : no connectivity defined !");
590 return _connectivity->existConnectivity(connectivityType,entity);
593 Return the geometric type of global element Number of entity Entity.
595 Throw an exception if Entity is not defined or Number are wrong (too big).
597 inline medGeometryElement MESH::getElementType(medEntityMesh Entity,int Number) const
599 // checkGridFillConnectivity();
600 if (_connectivity==(CONNECTIVITY*)NULL)
601 throw MEDEXCEPTION("MESH::getElementType(medEntityMesh,int) : no connectivity defined !");
602 return _connectivity->getElementType(Entity,Number);
605 Calculate the ask connectivity. Return an exception if this could not be
606 done. Do nothing if connectivity already exist.
609 inline void MESH::calculateConnectivity(medModeSwitch Mode,medConnectivity ConnectivityType,medEntityMesh entity) const
611 // checkGridFillConnectivity();
612 if (Mode==MED_FULL_INTERLACE)
613 _connectivity->calculateConnectivity(ConnectivityType,entity);
615 throw MEDEXCEPTION(LOCALIZED("MESH::calculateConnectivity : only for MED_FULL_INTERLACE mode"));
618 Return the required connectivity in the right mode for the given
619 geometric type of the given entity.
621 To get connectivity for all geometric type, use Mode=MED_FULL_INTERLACE
622 and Type=MED_ALL_ELEMENTS.
623 You must also get the corresponding index array.
625 inline const int * MESH::getConnectivity(medModeSwitch Mode,medConnectivity ConnectivityType,medEntityMesh entity, medGeometryElement Type) const
627 // checkGridFillConnectivity();
628 if (Mode==MED_FULL_INTERLACE)
629 return _connectivity->getConnectivity(ConnectivityType,entity,Type);
630 throw MEDEXCEPTION(LOCALIZED("MESH::getConnectivity : only for MED_FULL_INTERLACE mode"));
633 Return the required index array for a connectivity received in
634 MED_FULL_ENTERLACE mode and MED_ALL_ELEMENTS type.
636 This array allow to find connectivity of each elements.
638 Example : Connectivity of i^{th} elements (1<=i<=NumberOfElement) begin
639 at index ConnectivityIndex[i-1] and end at index ConnectivityIndex[i]-1
640 in Connectivity array (Connectivity[ConnectivityIndex[i-1]-1] is the
643 inline const int * MESH::getConnectivityIndex(medConnectivity ConnectivityType,medEntityMesh entity) const
645 // checkGridFillConnectivity();
646 return _connectivity->getConnectivityIndex(ConnectivityType, entity);
649 Return the reverse connectivity required by ConnectivityType :
650 - If ConnectivityType=MED_NODAL : return connectivity node-cell
651 - If ConnectivityType=MED_DESCENDING : return connectivity face-cell
653 You must get ReverseConnectivityIndex array to use it.
655 inline const int * MESH::getReverseConnectivity(medConnectivity ConnectivityType,medEntityMesh Entity/*=MED_CELL*/) const
657 // checkGridFillConnectivity();
658 if (NULL==_connectivity)
659 throw MEDEXCEPTION("MESH::getReverseConnectivity : no connectivity defined in MESH !");
661 return _connectivity->getReverseConnectivity(ConnectivityType,Entity);
664 Return the index array required by ConnectivityType.
666 This array allow to find reverse connectivity of each elements.
668 Example : Reverse connectivity of i^{th} elements (1<=i<=NumberOfElement)
669 begin at index ReverseConnectivityIndex[i-1] and end at index
670 ReverseConnectivityIndex[i]-1
671 in ReverseConnectivity array (
672 ReverseConnectivity[ReverseConnectivityIndex[i-1]-1]
675 inline const int * MESH::getReverseConnectivityIndex(medConnectivity ConnectivityType,medEntityMesh Entity/*=MED_CELL*/) const
677 // checkGridFillConnectivity();
678 if (NULL==_connectivity)
679 throw MEDEXCEPTION("MESH::getReverseConnectivityIndex : no connectivity defined in MESH !");
681 return _connectivity->getReverseConnectivityIndex(ConnectivityType,Entity);
685 inline int MESH::getNumberOfFamilies (medEntityMesh entity) const
689 return _familyNode.size();
691 return _familyCell.size();
693 return _familyFace.size();
695 return _familyEdge.size();
697 throw MEDEXCEPTION("MESH::getNumberOfFamilies : Unknown entity");
700 inline int MESH::getNumberOfGroups (medEntityMesh entity) const
704 return _groupNode.size();
706 return _groupCell.size();
708 return _groupFace.size();
710 return _groupEdge.size();
712 throw MEDEXCEPTION("MESH::getNumberOfGroups : Unknown entity");
715 const vector<MEDMEM::FAMILY*> MESH::getFamilies(medEntityMesh entity) const
727 throw MEDEXCEPTION("MESH::getFamilies : Unknown entity");
731 const vector<GROUP*> MESH::getGroups(medEntityMesh entity) const
743 throw MEDEXCEPTION("MESH::getGroups : Unknown entity");
747 const MEDMEM::FAMILY* MESH::getFamily(medEntityMesh entity, int i) const
750 throw MEDEXCEPTION("MESH::getFamily(i) : argument i must be > 0");
751 vector<FAMILY*> Family;
754 Family = _familyNode;
758 Family = _familyCell;
762 Family = _familyFace;
766 Family = _familyEdge;
770 throw MEDEXCEPTION("MESH::getFamilies : Unknown entity");
773 throw MEDEXCEPTION("MESH::getFamily(entity,i) : argument i must be <= _numberOfFamilies");
777 const GROUP* MESH::getGroup(medEntityMesh entity, int i) const
779 const char * LOC = "MESH::getGroup(medEntityMesh entity, int i) : ";
781 throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<"argument i must be > 0"));
782 vector<GROUP*> Group;
801 throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<"Unknown entity"));
804 throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<"argument i="<<i<<" must be <= _numberOfGroups="<<Group.size()));
813 //inline void MESH::write(const string & driverName) {
814 // write(0,driverName);
817 inline bool MESH::getIsAGrid()
824 #endif /* MESH_HXX */