From c17f023b59d00fc9eddc663f87d14b10a1bc7a17 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 30 Dec 2015 13:39:10 +0100 Subject: [PATCH] End of solution 1. Better solution rename family on the fly. --- src/MEDLoader/MEDFileBasis.cxx | 5 +++++ src/MEDLoader/MEDFileBasis.hxx | 1 + src/MEDLoader/MEDFileMeshLL.cxx | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) 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