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