]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
MEDReader ready -> debug is in progress.
authorageay <ageay>
Mon, 29 Jul 2013 10:05:09 +0000 (10:05 +0000)
committerageay <ageay>
Mon, 29 Jul 2013 10:05:09 +0000 (10:05 +0000)
src/MEDLoader/MEDFileField.cxx
src/MEDLoader/MEDFileMesh.cxx

index 1b69de2ea9edc457cb1c148b2a16a0b33d89832b..bc2d6e5c600c94e930c5c7f485eb01b862043ec5 100644 (file)
@@ -8297,24 +8297,19 @@ std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > MEDFileAnyTypeFieldMult
   for(std::vector<MEDFileAnyTypeFieldMultiTS *>::const_iterator it2=vectFMTSNodes.begin();it2!=vectFMTSNodes.end();it2++)
     {
       i=0;
-      if(retCell.empty())
-        {
-          std::vector<MEDFileAnyTypeFieldMultiTS *> tmp(1,*it2);
-          MEDCouplingAutoRefCountObjectPtr<MEDFileMeshStruct> tmp2(MEDFileMeshStruct::New(mesh));
-          ret.push_back(tmp); retCell.push_back(tmp); cmps.push_back(MEDFileFastCellSupportComparator::New(tmp2,*it2));
-          continue;
-        }
+      bool isFetched(false);
       for(std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> >::const_iterator it0=retCell.begin();it0!=retCell.end();it0++,i++)
         {
           if((*it0).empty())
             throw INTERP_KERNEL::Exception("MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport : internal error !");
           if(cmps[i]->isCompatibleWithNodesDiscr(*it2))
-            ret[i].push_back(*it2);
-          else
-            {
-              std::vector<MEDFileAnyTypeFieldMultiTS *> ret0(1,*it2);
-              ret.push_back(ret0);
-            }
+            { ret[i].push_back(*it2); isFetched=true; }
+        }
+      if(!isFetched)
+        {
+          std::vector<MEDFileAnyTypeFieldMultiTS *> tmp(1,*it2);
+          MEDCouplingAutoRefCountObjectPtr<MEDFileMeshStruct> tmp2(MEDFileMeshStruct::New(mesh));
+          ret.push_back(tmp); retCell.push_back(tmp); cmps.push_back(MEDFileFastCellSupportComparator::New(tmp2,*it2));
         }
     }
   return ret;
index 6f2fac6e93a67de4b0c51db09ea9e5f7122769a2..222b914c3d98eb79981d557ce7d11bd6a4fea510 100644 (file)
@@ -2642,7 +2642,7 @@ void MEDFileUMesh::whichAreNodesFetched(const MEDFileField1TSStructItem& st, con
           if(d[3*j]!=(int)curGt)
             offset+=d[3*j+1];
           else
-            { break; nbOfEltWT=d[3*j+1]; }
+            { nbOfEltWT=d[3*j+1]; break; }
         }
       if(nbOfEltWT==-1)
         throw INTERP_KERNEL::Exception("MEDFileUMesh::whichAreNodesFetched : asking for a geo type not present in this !");