- std::vector<double> LesExtremes;
-
- // Ouverture du Fichier Med
- med_idt medIdt = MEDfileOpen(aFile,MED_ACC_RDONLY);
- if (medIdt <0)
- {
- // GERALD -- QMESSAGE BOX
- std::cerr << "Error : mesh is unreadable" << std::endl;
- return LesExtremes;
- }
-
- // Le fichier Med est lisible
- // Boucle sur les noms de maillage
- med_int numberOfMeshes = MEDnMesh(medIdt) ;
- if (numberOfMeshes != 1 )
- {
- // GERALD -- QMESSAGE BOX
- std::cerr << "Error : file contains more than one mesh" << std::endl;
- return LesExtremes;
- }
-
- char meshname[MED_NAME_SIZE+1];
- med_int spacedim,meshdim;
- med_mesh_type meshtype;
- char descriptionription[MED_COMMENT_SIZE+1];
- char dtunit[MED_SNAME_SIZE+1];
- med_sorting_type sortingtype;
- med_int nstep;
- med_axis_type axistype;
- int naxis = MEDmeshnAxis(medIdt,1);
- char *axisname=new char[naxis*MED_SNAME_SIZE+1];
- char *axisunit=new char[naxis*MED_SNAME_SIZE+1];
- med_err aRet = MEDmeshInfo(medIdt,
- 1,
- meshname,
- &spacedim,
- &meshdim,
- &meshtype,
- descriptionription,
- dtunit,
- &sortingtype,
- &nstep,
- &axistype,
- axisname,
- axisunit);
-
- if (aRet < 0)
- {
- // GERALD -- QMESSAGE BOX
- std::cerr << "Error : mesh is unreadable" << std::endl;
- return LesExtremes;
- }
-
- med_bool chgt,trsf;
- med_int nnoe = MEDmeshnEntity(medIdt,
+ std::vector<double> LesExtremes;
+ med_err erreur = 0 ;
+ med_idt medIdt ;
+ while ( erreur == 0 )
+ {
+ // Ouverture du fichier
+ medIdt = MEDfileOpen(aFile,MED_ACC_RDONLY);
+ if ( medIdt < 0 )
+ {
+ erreur = 1 ;
+ break ;
+ }
+ //Nombre de maillage : on ne peut en lire qu'un seul
+ med_int numberOfMeshes = MEDnMesh(medIdt) ;
+ if (numberOfMeshes != 1 )
+ {
+ erreur = 2 ;
+ break ;
+ }
+ // Caracteristiques du maillage
+ char meshname[MED_NAME_SIZE+1];
+ med_int spacedim,meshdim;
+ med_mesh_type meshtype;
+ char descriptionription[MED_COMMENT_SIZE+1];
+ char dtunit[MED_SNAME_SIZE+1];
+ med_sorting_type sortingtype;
+ med_int nstep;
+ med_axis_type axistype;
+ int naxis = MEDmeshnAxis(medIdt,1);
+ char *axisname=new char[naxis*MED_SNAME_SIZE+1];
+ char *axisunit=new char[naxis*MED_SNAME_SIZE+1];
+ erreur = MEDmeshInfo(medIdt,
+ 1,