2 #include "MEDMEM_CellModel.hxx"
3 #include "MEDMEM_DriversDef.hxx"
6 using namespace MEDMEM;
7 using namespace MED_EN;
9 int main (int argc, char ** argv) {
10 list<medGeometryElement> geomList = meshEntities[MED_CELL] ;
11 list<medGeometryElement>::iterator itGeomList ;
12 for(itGeomList=geomList.begin();itGeomList!=geomList.end();itGeomList++) {
13 CELLMODEL myCellModel((MED_EN::medGeometryElement)(*itGeomList)) ;
15 cout << "First CellModel :" << endl << endl ;
17 cout << myCellModel << endl ;
19 cout << "Number of constituents type : "<<myCellModel.getNumberOfConstituentsType() << endl ;
21 set <medGeometryElement> geomType = myCellModel.getAllConstituentsType() ;
22 set <medGeometryElement>::iterator geomTypeIt ;
23 cout << "Types list : " ;
24 for(geomTypeIt=geomType.begin();geomTypeIt!=geomType.end();geomTypeIt++)
25 cout << (*geomTypeIt) << " " ;
28 map <medGeometryElement,int> myMap = myCellModel.getNumberOfConstituentsForeachType() ;
29 map <medGeometryElement,int>::iterator myMapIt ;
30 for(myMapIt=myMap.begin();myMapIt!=myMap.end();myMapIt++)
31 cout << " - " << (*myMapIt).second << " constituent(s) of type " << (*myMapIt).first << endl ;
34 cout << "Second CellModel :" << endl << endl ;
35 CELLMODEL myCellModel2=myCellModel ;
36 cout << myCellModel2 << endl ;
38 cout << "Third CellModel :" << endl << endl ;
39 CELLMODEL myCellModel3 ;
40 myCellModel3=myCellModel ;
41 cout << myCellModel3 << endl ;