-// =======================================================================
-// =======================================================================
-QString lireNomMaillage2(med_idt medIdt,int meshId, med_int& meshdim )
-{
- QString NomMaillage=QString::null;
- char meshname[MED_NAME_SIZE+1];
- med_int spacedim;
- 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,
- meshId,
- meshname,
- &spacedim,
- &meshdim,
- &meshtype,
- descriptionription,
- dtunit,
- &sortingtype,
- &nstep,
- &axistype,
- axisname,
- axisunit);
-
- if ( aRet < 0 ) {
- QMessageBox::critical( 0, QObject::tr("MG_ADAPT_ERROR"), \
- QObject::tr("MG_ADAPT_MED_FILE_4") );
- }
- else {
- NomMaillage=QString(meshname);
- }
+ // Dimension du maillage
+ MEDCoupling::MCAuto<MEDCoupling::MEDFileData> mfd = MEDCoupling::MEDFileData::New(aFile.toStdString());
+ meshdim = mfd->getMeshes()->getMeshAtPos(0)->getMeshDimension() ;
+// std::cout << "meshdim:" << meshdim << std::endl;