+#else
+ MEDFileUtilities::AutoFid fid(MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY));
+#endif
+ return ParaMEDFileUMesh::NewPrivate(fid,iPart,nbOfParts,fileName,mName,dt,it,mrs);
+}
+
+MEDFileUMesh *ParaMEDFileUMesh::NewPrivate(med_idt fid, int iPart, int nbOfParts, const std::string& fileName, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs)
+{
+ MCAuto<MEDFileUMesh> ret;
+ int meshDim, spaceDim;
+ mcIdType numberOfNodes;
+ std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > typesDistrib(GetUMeshGlobalInfo(fileName,mName,meshDim,spaceDim,numberOfNodes));
+ std::vector<INTERP_KERNEL::NormalizedCellType> types;
+ std::vector<mcIdType> distrib;
+ for(std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > >::const_iterator it0=typesDistrib.begin();it0!=typesDistrib.end();it0++)
+ for(std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
+ {
+ types.push_back((*it1).first);
+ mcIdType tmp[3];
+ DataArray::GetSlice(0,(*it1).second,1,iPart,nbOfParts,tmp[0],tmp[1]);
+ tmp[2]=1;
+ distrib.insert(distrib.end(),tmp,tmp+3);
+ }
+ ret=MEDFileUMesh::LoadPartOf(fid,mName,types,distrib,dt,it,mrs);
+ return ret.retn();
+}
+
+MEDFileMeshes *ParaMEDFileMeshes::New(int iPart, int nbOfParts, const std::string& fileName)
+{
+ std::vector<std::string> ms(GetMeshNames(fileName));
+ MCAuto<MEDFileMeshes> ret(MEDFileMeshes::New());
+ for(std::vector<std::string>::const_iterator it=ms.begin();it!=ms.end();it++)
+ {
+ MCAuto<MEDFileMesh> mesh(ParaMEDFileMesh::New(iPart,nbOfParts,fileName,(*it)));
+ ret->pushMesh(mesh);
+ }