- std::vector<std::string> ms(MEDCoupling::GetMeshNames(fileName));
- if(ms.empty())
- {
- std::ostringstream oss; oss << "MEDFileUMesh::New : no meshes in file \"" << fileName << "\" !";
- throw INTERP_KERNEL::Exception(oss.str().c_str());
- }
- MEDFileUtilities::CheckFileForRead(fileName);
- MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
- int dt,it;
- MEDCoupling::MEDCouplingMeshType meshType;
- MEDCoupling::MEDCouplingAxisType dummy3;
- std::string dummy2;
- MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dummy3,dt,it,dummy2);
- return new MEDFileCurveLinearMesh(fid,ms.front(),dt,it,mrs);