]> SALOME platform Git repositories - modules/med.git/blob - src/MEDMEM/test_MEDMEM_CellModel.cxx
Salome HOME
Initialisation module MED_SRC de la base MED
[modules/med.git] / src / MEDMEM / test_MEDMEM_CellModel.cxx
1 #include "utilities.h"
2 #include "MEDMEM_CellModel.hxx"
3 #include "MEDMEM_DriversDef.hxx"
4
5 int main (int argc, char ** argv) {
6   list<MED_FR::med_geometrie_element> geomList = MED_FR::meshEntities[MED_FR::MED_MAILLE] ;
7   list<MED_FR::med_geometrie_element>::iterator itGeomList ;
8   for(itGeomList=geomList.begin();itGeomList!=geomList.end();itGeomList++) {
9     CELLMODEL myCellModel((MED_EN::medGeometryElement)(*itGeomList)) ;
10
11     cout << myCellModel << endl ;
12
13     cout << "Number of constituents type : "<<myCellModel.getNumberOfConstituentsType() << endl ;
14
15     set <medGeometryElement> geomType = myCellModel.getAllConstituentsType() ;
16     set <medGeometryElement>::iterator geomTypeIt ;
17     cout << "Types list : " ;
18     for(geomTypeIt=geomType.begin();geomTypeIt!=geomType.end();geomTypeIt++)
19       cout << (*geomTypeIt) << " " ;
20     cout << endl;
21     
22     map <medGeometryElement,int> myMap = myCellModel.getNumberOfConstituentsForeachType() ; 
23     map <medGeometryElement,int>::iterator myMapIt ;
24     for(myMapIt=myMap.begin();myMapIt!=myMap.end();myMapIt++)
25       cout << " - " << (*myMapIt).second << " constituent(s) of type " << (*myMapIt).first << endl ;
26     cout << endl;
27
28   }
29 }