From: Anthony Geay Date: Wed, 30 Dec 2015 12:39:10 +0000 (+0100) Subject: End of solution 1. Better solution rename family on the fly. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c17f023b59d00fc9eddc663f87d14b10a1bc7a17;p=tools%2Fmedcoupling.git End of solution 1. Better solution rename family on the fly. --- diff --git a/src/MEDLoader/MEDFileBasis.cxx b/src/MEDLoader/MEDFileBasis.cxx index 0ce48bf96..dbe8dd729 100644 --- a/src/MEDLoader/MEDFileBasis.cxx +++ b/src/MEDLoader/MEDFileBasis.cxx @@ -124,3 +124,8 @@ void IFams::addIdsIn(std::set& s) const { s.insert(_v.begin(),_v.end()); } + +void IFams::pushBack(int v) +{ + _v.push_back(v); +} diff --git a/src/MEDLoader/MEDFileBasis.hxx b/src/MEDLoader/MEDFileBasis.hxx index c7bf6f7cf..a96c219f2 100644 --- a/src/MEDLoader/MEDFileBasis.hxx +++ b/src/MEDLoader/MEDFileBasis.hxx @@ -74,6 +74,7 @@ public: int minn() const; int maxAbs() const; void addIdsIn(std::set& s) const; + void pushBack(int v); private: std::vector _v; }; diff --git a/src/MEDLoader/MEDFileMeshLL.cxx b/src/MEDLoader/MEDFileMeshLL.cxx index 0d9caceb8..b966849ac 100644 --- a/src/MEDLoader/MEDFileMeshLL.cxx +++ b/src/MEDLoader/MEDFileMeshLL.cxx @@ -209,7 +209,7 @@ void MEDFileMeshL2::ReadFamiliesAndGrps(med_idt fid, const std::string& meshName INTERP_KERNEL::AutoPtr gro=new char[MED_LNAME_SIZE*ngro+1]; MEDfamily23Info(fid,meshName.c_str(),i+1,nomfam,attide,attval,attdes,&numfam,gro); std::string famName=MEDLoaderBase::buildStringFromFortran(nomfam,MED_NAME_SIZE); - fams[famName]=numfam; + fams[famName].pushBack(numfam); for(int j=0;j