+ else
+ throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::loadPart : not implemented yet for the dynamic type !");
+}
+
+void MEDFileUMeshPerType::loadFromStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
+ med_entity_type entity, MEDFileMeshReadSelector *mrs)
+{
+ _m=MEDCoupling1SGTUMesh::New(mName,type);
+ MEDCoupling1SGTUMesh *mc(dynamic_cast<MEDCoupling1SGTUMesh *>((MEDCoupling1GTUMesh *)_m));
+ MCAuto<DataArrayInt> conn(DataArrayInt::New());
+ int nbOfNodesPerCell(mc->getNumberOfNodesPerCell());
+ conn->alloc(nbOfNodesPerCell*curNbOfElem,1);
+ MEDFILESAFECALLERRD0(MEDmeshElementConnectivityRd,(fid,mName,dt,it,entity,geoElt,MED_NODAL,MED_FULL_INTERLACE,conn->getPointer()));
+ std::transform(conn->begin(),conn->end(),conn->getPointer(),std::bind2nd(std::plus<int>(),-1));
+ mc->setNodalConnectivity(conn);
+ loadCommonPart(fid,mName,dt,it,curNbOfElem,geoElt,entity,mrs);
+}
+
+void MEDFileUMeshPerType::loadPartStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
+ med_entity_type entity, int strt, int end, int step, MEDFileMeshReadSelector *mrs)
+{
+ if(strt<0)
+ throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::loadPartStaticType : start pos is negative !");
+ if(end>curNbOfElem)
+ throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::loadPartStaticType : end is after the authorized range !");
+ int nbOfEltsToLoad(DataArray::GetNumberOfItemGivenBES(strt,end,step,"MEDFileUMeshPerType::loadPartStaticType"));
+ _m=MEDCoupling1SGTUMesh::New(mName,type);
+ MEDCoupling1SGTUMesh *mc(dynamic_cast<MEDCoupling1SGTUMesh *>((MEDCoupling1GTUMesh *)_m));
+ MCAuto<DataArrayInt> conn(DataArrayInt::New());
+ int nbOfNodesPerCell(mc->getNumberOfNodesPerCell());
+ conn->alloc(nbOfNodesPerCell*nbOfEltsToLoad,1);
+ med_filter filter=MED_FILTER_INIT;
+ MEDfilterBlockOfEntityCr(fid,/*nentity*/curNbOfElem,/*nvaluesperentity*/1,/*nconstituentpervalue*/nbOfNodesPerCell,
+ MED_ALL_CONSTITUENT,MED_FULL_INTERLACE,MED_COMPACT_STMODE,MED_NO_PROFILE,
+ /*start*/strt+1,/*stride*/step,/*count*/1,/*blocksize*/nbOfEltsToLoad,
+ /*lastblocksize=useless because count=1*/0,&filter);
+ MEDFILESAFECALLERRD0(MEDmeshElementConnectivityAdvancedRd,(fid,mName,dt,it,entity,geoElt,MED_NODAL,&filter,conn->getPointer()));
+ MEDfilterClose(&filter);
+ std::transform(conn->begin(),conn->end(),conn->getPointer(),std::bind2nd(std::plus<int>(),-1));
+ mc->setNodalConnectivity(conn);
+ loadPartOfCellCommonPart(fid,mName,strt,end,step,dt,it,mdim,curNbOfElem,geoElt,entity,mrs);