2 #include "MEDMEM_CellModel.hxx"
3 #include "MEDMEM_DriversDef.hxx"
6 #include "LocalTraceCollector.hxx"
7 #endif /* ifdef _DEBUG_*/
10 using namespace MEDMEM;
11 using namespace MED_EN;
13 int main (int argc, char ** argv) {
15 LocalTraceCollector::instance();
16 #endif /* ifdef _DEBUG_*/
18 list<medGeometryElement> geomList = meshEntities[MED_CELL] ;
19 list<medGeometryElement>::iterator itGeomList ;
20 for(itGeomList=geomList.begin();itGeomList!=geomList.end();itGeomList++) {
21 CELLMODEL myCellModel((MED_EN::medGeometryElement)(*itGeomList)) ;
23 cout << "First CellModel :" << endl << endl ;
25 cout << myCellModel << endl ;
27 cout << "Number of constituents type : "<<myCellModel.getNumberOfConstituentsType() << endl ;
29 set <medGeometryElement> geomType = myCellModel.getAllConstituentsType() ;
30 set <medGeometryElement>::iterator geomTypeIt ;
31 cout << "Types list : " ;
32 for(geomTypeIt=geomType.begin();geomTypeIt!=geomType.end();geomTypeIt++)
33 cout << (*geomTypeIt) << " " ;
36 map <medGeometryElement,int> myMap = myCellModel.getNumberOfConstituentsForeachType() ;
37 map <medGeometryElement,int>::iterator myMapIt ;
38 for(myMapIt=myMap.begin();myMapIt!=myMap.end();myMapIt++)
39 cout << " - " << (*myMapIt).second << " constituent(s) of type " << (*myMapIt).first << endl ;
42 cout << "Second CellModel :" << endl << endl ;
43 CELLMODEL myCellModel2=myCellModel ;
44 cout << myCellModel2 << endl ;
46 cout << "Third CellModel :" << endl << endl ;
47 CELLMODEL myCellModel3 ;
48 myCellModel3=myCellModel ;
49 cout << myCellModel3 << endl ;