Salome HOME
Just do it
[tools/medcoupling.git] / src / MEDLoader / MEDFileMeshLL.cxx
index 337ea7d17b4ece78044cfb98428ac8aa0f83d013..65d4e4c4cde45496570400039e6c177e310a1b7f 100644 (file)
@@ -2092,8 +2092,10 @@ MEDFileEltStruct4Mesh::MEDFileEltStruct4Mesh(med_idt fid, const std::string& mNa
   MCAuto<MEDFileMeshSupports> mss(MEDFileMeshSupports::New(fid));
   MCAuto<MEDFileStructureElements> mse(MEDFileStructureElements::New(fid,mss));
   int nbEntities(mse->getNumberOfNodesPerSE(_geo_type_name));
-  _conn=DataArrayInt::New(); _conn->alloc(nCells,nbEntities);
+  _conn=DataArrayInt::New(); _conn->alloc(nCells*nbEntities);
   MEDFILESAFECALLERRD0(MEDmeshElementConnectivityRd,(fid,mName.c_str(),dt,it,MED_STRUCT_ELEMENT,_geo_type,MED_NODAL,MED_FULL_INTERLACE,_conn->getPointer()));
+  _conn->applyLin(1,-1);
+  _conn->rearrange(nbEntities);
   _common=MEDFileUMeshPerTypeCommon::New();
   _common->loadCommonPart(fid,mName.c_str(),dt,it,nCells,geoType,MED_STRUCT_ELEMENT,mrs);
   std::vector<std::string> vns(mse->getVarAttsOf(_geo_type_name));