1 #ifndef DRIVERTOOLS_HXX
2 #define DRIVERTOOLS_HXX
5 #include "MEDMEM_define.hxx"
6 #include "MEDMEM_Exception.hxx"
22 std::vector<double> coord;
27 typedef std::map<int,_noeud>::iterator iter;
28 MED_EN::medGeometryElement geometricType;
29 std::vector< iter > sommets;
30 mutable unsigned ordre; // l'ordre est fixé après insertion dans le set, et ne change ni l'état, ni l'ordre -> mutable
32 _maille(MED_EN::medGeometryElement _geometricType, size_t nelem) : geometricType(_geometricType),ordre(0)
34 sommets.reserve(nelem);
36 int dimension() const // retourne la dimension de la maille
38 return geometricType/100;
40 bool operator < (const _maille& ma) const;
41 MED_EN::medEntityMesh getEntity(const int meshDimension) const throw (MEDEXCEPTION);
44 struct _mailleIteratorCompare // pour ordonner le set d'iterateurs sur mailles
46 bool operator () (std::set<_maille>::iterator i1, std::set<_maille>::iterator i2)
54 typedef std::set< std::set<_maille>::iterator>::const_iterator mailleIter;
56 std::set< std::set<_maille>::iterator, _mailleIteratorCompare > mailles; // iterateurs sur les mailles composant le groupe
57 std::list<int> groupes; // indices des sous-groupes composant le groupe
62 * Intermediate structure used by drivers to store data read from the other format file.
63 * The structure provides functions that transform the stored data to the MED format :
64 * getCoordinate(), getConnectivity(), getGroups().
65 * The elements inserted in maillage and points are automaticaly ordered.
66 * Renumbering are performed by getConnectivity & getGroups before writing the MED structures.
67 * Read the conception ducumentation for more details.
70 struct _intermediateMED
72 std::set<_maille> maillage;
73 std::vector<_groupe> groupes;
74 std::map< int, _noeud > points;
76 CONNECTIVITY * getConnectivity(); // set MED connectivity from the intermediate structure
77 COORDINATE * getCoordinate(); // set MED coordinate from the intermediate structure
78 void getGroups(std::vector<GROUP *> & _groupCell, std::vector<GROUP *> & _groupFace, std::vector<GROUP *> & _groupEdge, std::vector<GROUP *> & _groupNode, MESH * _ptrMesh);
80 // used by previous functions to renumber points & mesh.
81 void numerotationMaillage();
82 void numerotationPoints();
86 std::ostream& operator << (std::ostream& , const _maille& );
87 std::ostream& operator << (std::ostream& , const _groupe& );
88 std::ostream& operator << (std::ostream& , const _noeud& );
89 std::ostream& operator << (std::ostream& , const _intermediateMED& );
92 #endif /* DRIVERTOOLS_HXX */