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