From 168d9f578ffb5aac9d4bf46dad356dd1bd4f2723 Mon Sep 17 00:00:00 2001 From: ageay Date: Mon, 29 Jul 2013 10:05:09 +0000 Subject: [PATCH] MEDReader ready -> debug is in progress. --- src/MEDLoader/MEDFileField.cxx | 21 ++++++++------------- src/MEDLoader/MEDFileMesh.cxx | 2 +- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/MEDLoader/MEDFileField.cxx b/src/MEDLoader/MEDFileField.cxx index 1b69de2ea..bc2d6e5c6 100644 --- a/src/MEDLoader/MEDFileField.cxx +++ b/src/MEDLoader/MEDFileField.cxx @@ -8297,24 +8297,19 @@ std::vector< std::vector > MEDFileAnyTypeFieldMult for(std::vector::const_iterator it2=vectFMTSNodes.begin();it2!=vectFMTSNodes.end();it2++) { i=0; - if(retCell.empty()) - { - std::vector tmp(1,*it2); - MEDCouplingAutoRefCountObjectPtr 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 >::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 ret0(1,*it2); - ret.push_back(ret0); - } + { ret[i].push_back(*it2); isFetched=true; } + } + if(!isFetched) + { + std::vector tmp(1,*it2); + MEDCouplingAutoRefCountObjectPtr tmp2(MEDFileMeshStruct::New(mesh)); + ret.push_back(tmp); retCell.push_back(tmp); cmps.push_back(MEDFileFastCellSupportComparator::New(tmp2,*it2)); } } return ret; diff --git a/src/MEDLoader/MEDFileMesh.cxx b/src/MEDLoader/MEDFileMesh.cxx index 6f2fac6e9..222b914c3 100644 --- a/src/MEDLoader/MEDFileMesh.cxx +++ b/src/MEDLoader/MEDFileMesh.cxx @@ -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 !"); -- 2.39.2