_fw->newPerMeshPerTypePerDisc(pmptpd);
}
+void MEDFileBlowStrEltUp::DealWithConflictNames(MEDFileAnyTypeFieldMultiTS *fmtsToAdd, const MEDFileFields *fs)
+{
+ std::vector<std::string> fnames(fs->getFieldsNames());
+ for(int i=0;i<1000;i++)
+ {
+ std::ostringstream oss; oss << fmtsToAdd->getName();
+ if(i>=1)
+ oss << "_" << i-1;
+ if(std::find(fnames.begin(),fnames.end(),oss.str())==fnames.end())
+ {
+ fmtsToAdd->setName(oss.str());
+ return ;
+ }
+ }
+ throw INTERP_KERNEL::Exception("DealWithConflictNames : Eh eh interesting !");
+}
+
MCAuto<MEDFileFields> MEDFileBlowStrEltUp::splitFieldsPerLoc(const MEDFileFields *fields, const MEDFileUMesh *mesh, MEDFileMeshes *msOut, MEDFileFields *allZeOutFields)
{
LocSpliter ls(fields);
for(int j=0;j<(*it)->getNumberOfFields();j++)
{
MCAuto<MEDFileAnyTypeFieldMultiTS> fmts((*it)->getFieldAtPos(j));
+ DealWithConflictNames(fmts,allZeOutFields);
allZeOutFields->pushField(fmts);
}
}
void dealWithMEDBALLSInFields(const MEDFileFields *fs, const MEDFileEltStruct4Mesh *zeStr, const MEDFileFields *varAtt, MEDFileFields *zeOutputs) const;
static std::string BuildNewMeshName(const std::string& meshName, const std::string& seName);
static std::string BuildVarAttName(std::size_t iPart, std::size_t totINbParts, std::size_t jPart, std::size_t totJNbParts, const std::string& name);
+ static void DealWithConflictNames(MEDFileAnyTypeFieldMultiTS *fmtsToAdd, const MEDFileFields *fs);
public:
static const char MED_BALL_STR[];
private: