_localization=newLocName;
}
+void MEDFileFieldPerMeshPerTypePerDisc::changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< std::pair<std::vector<std::string>, std::string > >::const_iterator it2=mapOfModif.begin();it2!=mapOfModif.end();it2++)
+ {
+ if(std::find((*it2).first.begin(),(*it2).first.end(),_profile)!=(*it2).first.end())
+ {
+ _profile=(*it2).second;
+ return;
+ }
+ }
+}
+
+void MEDFileFieldPerMeshPerTypePerDisc::changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< std::pair<std::vector<std::string>, std::string > >::const_iterator it2=mapOfModif.begin();it2!=mapOfModif.end();it2++)
+ {
+ if(std::find((*it2).first.begin(),(*it2).first.end(),_localization)!=(*it2).first.end())
+ {
+ _localization=(*it2).second;
+ return;
+ }
+ }
+}
+
void MEDFileFieldPerMeshPerTypePerDisc::getFieldAtLevel(TypeOfField type, const MEDFieldFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const
{
if(type!=_type)
return ret;
}
+void MEDFileFieldPerMeshPerType::changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldPerMeshPerTypePerDisc> >::iterator it1=_field_pm_pt_pd.begin();it1!=_field_pm_pt_pd.end();it1++)
+ (*it1)->changePflsRefsNamesGen(mapOfModif);
+}
+
+void MEDFileFieldPerMeshPerType::changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldPerMeshPerTypePerDisc> >::iterator it1=_field_pm_pt_pd.begin();it1!=_field_pm_pt_pd.end();it1++)
+ (*it1)->changeLocsRefsNamesGen(mapOfModif);
+}
+
MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerType::getLeafGivenLocId(int locId) throw(INTERP_KERNEL::Exception)
{
if(_field_pm_pt_pd.empty())
return ret;
}
+void MEDFileFieldPerMesh::changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerType > >::iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++)
+ (*it)->changePflsRefsNamesGen(mapOfModif);
+}
+
+void MEDFileFieldPerMesh::changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerType > >::iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++)
+ (*it)->changeLocsRefsNamesGen(mapOfModif);
+}
+
MEDCouplingFieldDouble *MEDFileFieldPerMesh::getFieldOnMeshAtLevel(TypeOfField type, const MEDFieldFieldGlobsReal *glob, const MEDCouplingMesh *mesh, bool& isPfl) const throw(INTERP_KERNEL::Exception)
{
if(_field_pm_pt.empty())
_file_name=fileName;
}
+void MEDFieldFieldGlobs::changePflsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> >::iterator it=_pfls.begin();it!=_pfls.end();it++)
+ {
+ DataArrayInt *elt(*it);
+ if(elt)
+ {
+ std::string name(elt->getName());
+ for(std::vector< std::pair<std::vector<std::string>, std::string > >::const_iterator it2=mapOfModif.begin();it2!=mapOfModif.end();it2++)
+ {
+ if(std::find((*it2).first.begin(),(*it2).first.end(),name)!=(*it2).first.end())
+ {
+ elt->setName((*it2).second.c_str());
+ return;
+ }
+ }
+ }
+ }
+}
+
+void MEDFieldFieldGlobs::changeLocsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldLoc> >::iterator it=_locs.begin();it!=_locs.end();it++)
+ {
+ MEDFileFieldLoc *elt(*it);
+ if(elt)
+ {
+ std::string name(elt->getName());
+ for(std::vector< std::pair<std::vector<std::string>, std::string > >::const_iterator it2=mapOfModif.begin();it2!=mapOfModif.end();it2++)
+ {
+ if(std::find((*it2).first.begin(),(*it2).first.end(),name)!=(*it2).first.end())
+ {
+ elt->setName((*it2).second.c_str());
+ return;
+ }
+ }
+ }
+ }
+}
+
int MEDFieldFieldGlobs::getNbOfGaussPtPerCell(int locId) const throw(INTERP_KERNEL::Exception)
{
if(locId<0 || locId>=(int)_locs.size())
return *it;
}
+const DataArrayInt *MEDFieldFieldGlobs::getProfileFromId(int pflId) const throw(INTERP_KERNEL::Exception)
+{
+ if(pflId<0 || pflId>=(int)_pfls.size())
+ throw INTERP_KERNEL::Exception("MEDFieldFieldGlobs::getProfileFromId : Invalid profile id !");
+ return _pfls[pflId];
+}
+
MEDFileFieldLoc& MEDFieldFieldGlobs::getLocalizationFromId(int locId) throw(INTERP_KERNEL::Exception)
{
if(locId<0 || locId>=(int)_locs.size())
return *it;
}
+DataArrayInt *MEDFieldFieldGlobs::getProfileFromId(int pflId) throw(INTERP_KERNEL::Exception)
+{
+ if(pflId<0 || pflId>=(int)_pfls.size())
+ throw INTERP_KERNEL::Exception("MEDFieldFieldGlobs::getProfileFromId : Invalid profile id !");
+ return _pfls[pflId];
+}
+
+void MEDFieldFieldGlobs::killProfileIds(const std::vector<int>& pflIds) throw(INTERP_KERNEL::Exception)
+{
+ std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > newPfls;
+ int i=0;
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> >::const_iterator it=_pfls.begin();it!=_pfls.end();it++,i++)
+ {
+ if(std::find(pflIds.begin(),pflIds.end(),i)==pflIds.end())
+ newPfls.push_back(*it);
+ }
+ _pfls=newPfls;
+}
+
+void MEDFieldFieldGlobs::killLocalizationIds(const std::vector<int>& locIds) throw(INTERP_KERNEL::Exception)
+{
+ std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldLoc> > newLocs;
+ int i=0;
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldLoc> >::const_iterator it=_locs.begin();it!=_locs.end();it++,i++)
+ {
+ if(std::find(locIds.begin(),locIds.end(),i)==locIds.end())
+ newLocs.push_back(*it);
+ }
+ _locs=newLocs;
+}
+
std::vector<std::string> MEDFieldFieldGlobs::getPfls() const
{
int sz=_pfls.size();
return std::find(v.begin(),v.end(),s)!=v.end();
}
+std::vector< std::vector<int> > MEDFieldFieldGlobs::whichAreEqualProfiles() const
+{
+ std::map<int,std::vector<int> > m;
+ int i=0;
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> >::const_iterator it=_pfls.begin();it!=_pfls.end();it++,i++)
+ {
+ const DataArrayInt *tmp=(*it);
+ if(tmp)
+ {
+ m[tmp->getHashCode()].push_back(i);
+ }
+ }
+ std::vector< std::vector<int> > ret;
+ for(std::map<int,std::vector<int> >::const_iterator it2=m.begin();it2!=m.end();it2++)
+ {
+ if((*it2).second.size()>1)
+ {
+ std::vector<int> ret0;
+ bool equalityOrNot=false;
+ for(std::vector<int>::const_iterator it3=(*it2).second.begin();it3!=(*it2).second.end();it3++)
+ {
+ std::vector<int>::const_iterator it4=it3; it4++;
+ for(;it4!=(*it2).second.end();it4++)
+ {
+ if(_pfls[*it3]->isEqualWithoutConsideringStr(*_pfls[*it4]))
+ {
+ if(!equalityOrNot)
+ ret0.push_back(*it3);
+ ret0.push_back(*it4);
+ equalityOrNot=true;
+ }
+ }
+ }
+ if(!ret0.empty())
+ ret.push_back(ret0);
+ }
+ }
+ return ret;
+}
+
+std::vector< std::vector<int> > MEDFieldFieldGlobs::whichAreEqualLocs(double eps) const
+{
+ throw INTERP_KERNEL::Exception("MEDFieldFieldGlobs::whichAreEqualLocs : no implemented yet ! Sorry !");
+}
+
void MEDFieldFieldGlobs::appendProfile(DataArrayInt *pfl) throw(INTERP_KERNEL::Exception)
{
std::string name(pfl->getName());
_globals->setFileName(fileName);
}
+std::vector< std::vector<int> > MEDFieldFieldGlobsReal::whichAreEqualProfiles() const
+{
+ return _globals->whichAreEqualProfiles();
+}
+
+std::vector< std::vector<int> > MEDFieldFieldGlobsReal::whichAreEqualLocs(double eps) const
+{
+ return _globals->whichAreEqualLocs(eps);
+}
+
+void MEDFieldFieldGlobsReal::changePflsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ _globals->changePflsNamesInStruct(mapOfModif);
+}
+
+void MEDFieldFieldGlobsReal::changeLocsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ _globals->changeLocsNamesInStruct(mapOfModif);
+}
+
+/*!
+ * This method is a generalization of MEDFieldFieldGlobsReal::changePflName.
+ * This method contrary to abstract method MEDFieldFieldGlobsReal::changePflsRefsNamesGen updates in addition of MEDFieldFieldGlobsReal::changePflsRefsNamesGen,
+ * the profiles themselves and not only leaves of field.
+ */
+void MEDFieldFieldGlobsReal::changePflsNames(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ changePflsRefsNamesGen(mapOfModif);
+ changePflsNamesInStruct(mapOfModif);
+}
+
+/*!
+ * This method is a generalization of MEDFieldFieldGlobsReal::changePflName.
+ * This method contrary to abstract method MEDFieldFieldGlobsReal::changeLocsRefsNamesGen updates in addition of MEDFieldFieldGlobsReal::changeLocsRefsNamesGen,
+ * the localizations themselves and not only leaves of field.
+ */
+void MEDFieldFieldGlobsReal::changeLocsNames(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ changeLocsRefsNamesGen(mapOfModif);
+ changeLocsNamesInStruct(mapOfModif);
+}
+
+/*!
+ * This method is a more friendly API but less general method than MEDFieldFieldGlobsReal::changePflsNames.
+ */
+void MEDFieldFieldGlobsReal::changePflName(const char *oldName, const char *newName) throw(INTERP_KERNEL::Exception)
+{
+ std::vector< std::pair<std::vector<std::string>, std::string > > mapOfModif(1);
+ std::pair<std::vector<std::string>, std::string > p(std::vector<std::string>(1,std::string(oldName)),std::string(newName));
+ mapOfModif[0]=p;
+ changePflsNames(mapOfModif);
+}
+
+/*!
+ * This method is a more friendly API but less general method than MEDFieldFieldGlobsReal::changeLocsNames.
+ */
+void MEDFieldFieldGlobsReal::changeLocName(const char *oldName, const char *newName) throw(INTERP_KERNEL::Exception)
+{
+ std::vector< std::pair<std::vector<std::string>, std::string > > mapOfModif(1);
+ std::pair<std::vector<std::string>, std::string > p(std::vector<std::string>(1,std::string(oldName)),std::string(newName));
+ mapOfModif[0]=p;
+ changeLocsNames(mapOfModif);
+}
+
+std::vector< std::pair<std::vector<std::string>, std::string > > MEDFieldFieldGlobsReal::zipPflsNames() throw(INTERP_KERNEL::Exception)
+{
+ std::vector< std::vector<int> > pseudoRet=whichAreEqualProfiles();
+ std::vector< std::pair<std::vector<std::string>, std::string > > ret(pseudoRet.size());
+ int i=0;
+ for(std::vector< std::vector<int> >::const_iterator it=pseudoRet.begin();it!=pseudoRet.end();it++,i++)
+ {
+ std::vector< std::string > tmp((*it).size());
+ int j=0;
+ for(std::vector<int>::const_iterator it2=(*it).begin();it2!=(*it).end();it2++,j++)
+ tmp[j]=std::string(getProfileFromId(*it2)->getName());
+ std::pair<std::vector<std::string>, std::string > p(tmp,tmp.front());
+ ret[i]=p;
+ std::vector<int> tmp2((*it).begin()+1,(*it).end());
+ killProfileIds(tmp2);
+ }
+ changePflsRefsNamesGen(ret);
+ return ret;
+}
+
+std::vector< std::pair<std::vector<std::string>, std::string > > MEDFieldFieldGlobsReal::zipLocsNames(double eps) throw(INTERP_KERNEL::Exception)
+{
+ std::vector< std::vector<int> > pseudoRet=whichAreEqualLocs(eps);
+ std::vector< std::pair<std::vector<std::string>, std::string > > ret(pseudoRet.size());
+ int i=0;
+ for(std::vector< std::vector<int> >::const_iterator it=pseudoRet.begin();it!=pseudoRet.end();it++,i++)
+ {
+ std::vector< std::string > tmp((*it).size());
+ int j=0;
+ for(std::vector<int>::const_iterator it2=(*it).begin();it2!=(*it).end();it2++,j++)
+ tmp[j]=std::string(getLocalizationFromId(*it2).getName());
+ std::pair<std::vector<std::string>, std::string > p(tmp,tmp.front());
+ ret[i]=p;
+ std::vector<int> tmp2((*it).begin()+1,(*it).end());
+ killLocalizationIds(tmp2);
+ }
+ changeLocsRefsNamesGen(ret);
+ return ret;
+}
+
int MEDFieldFieldGlobsReal::getNbOfGaussPtPerCell(int locId) const throw(INTERP_KERNEL::Exception)
{
return _globals->getNbOfGaussPtPerCell(locId);
return _globals->getProfile(pflName);
}
+const DataArrayInt *MEDFieldFieldGlobsReal::getProfileFromId(int pflId) const throw(INTERP_KERNEL::Exception)
+{
+ return _globals->getProfileFromId(pflId);
+}
+
MEDFileFieldLoc& MEDFieldFieldGlobsReal::getLocalizationFromId(int locId) throw(INTERP_KERNEL::Exception)
{
return _globals->getLocalizationFromId(locId);
return _globals->getProfile(pflName);
}
+DataArrayInt *MEDFieldFieldGlobsReal::getProfileFromId(int pflId) throw(INTERP_KERNEL::Exception)
+{
+ return _globals->getProfileFromId(pflId);
+}
+
+void MEDFieldFieldGlobsReal::killProfileIds(const std::vector<int>& pflIds) throw(INTERP_KERNEL::Exception)
+{
+ _globals->killProfileIds(pflIds);
+}
+
+void MEDFieldFieldGlobsReal::killLocalizationIds(const std::vector<int>& locIds) throw(INTERP_KERNEL::Exception)
+{
+ _globals->killLocalizationIds(locIds);
+}
+
void MEDFieldFieldGlobsReal::appendProfile(DataArrayInt *pfl) throw(INTERP_KERNEL::Exception)
{
_globals->appendProfile(pfl);
return ret;
}
+void MEDFileField1TSWithoutDAS::changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh > >::iterator it=_field_per_mesh.begin();it!=_field_per_mesh.end();it++)
+ (*it)->changePflsRefsNamesGen(mapOfModif);
+}
+
+void MEDFileField1TSWithoutDAS::changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh > >::iterator it=_field_per_mesh.begin();it!=_field_per_mesh.end();it++)
+ (*it)->changeLocsRefsNamesGen(mapOfModif);
+}
void MEDFileField1TSWithoutDAS::writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception)
{
return getLocsReallyUsedMulti2();
}
+void MEDFileField1TS::changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ changePflsRefsNamesGen2(mapOfModif);
+}
+
+void MEDFileField1TS::changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ changeLocsRefsNamesGen2(mapOfModif);
+}
+
/*!
* This method requests underlying file to perform the job, for mesh reading. If the current instance is not coming from a file and has been constructed from scratch
* an exception will be thrown. In this case you should use MEDFileField1TS::getFieldOnMeshAtLevel method instead.
return ret;
}
+void MEDFileFieldMultiTSWithoutDAS::changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileField1TSWithoutDAS > >::iterator it=_time_steps.begin();it!=_time_steps.end();it++)
+ (*it)->changePflsRefsNamesGen2(mapOfModif);
+}
+
+void MEDFileFieldMultiTSWithoutDAS::changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileField1TSWithoutDAS > >::iterator it=_time_steps.begin();it!=_time_steps.end();it++)
+ (*it)->changeLocsRefsNamesGen2(mapOfModif);
+}
+
MEDFileFieldMultiTS *MEDFileFieldMultiTS::New()
{
return new MEDFileFieldMultiTS;
return getLocsReallyUsedMulti2();
}
+void MEDFileFieldMultiTS::changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ changePflsRefsNamesGen2(mapOfModif);
+}
+
+void MEDFileFieldMultiTS::changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ changeLocsRefsNamesGen2(mapOfModif);
+}
+
MEDFileFields *MEDFileFields::New()
{
return new MEDFileFields;
return ret;
}
+void MEDFileFields::changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldMultiTSWithoutDAS > >::iterator it=_fields.begin();it!=_fields.end();it++)
+ (*it)->changePflsRefsNamesGen2(mapOfModif);
+}
+
+void MEDFileFields::changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception)
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldMultiTSWithoutDAS > >::iterator it=_fields.begin();it!=_fields.end();it++)
+ (*it)->changeLocsRefsNamesGen2(mapOfModif);
+}
+
void MEDFileFields::resize(int newSize) throw(INTERP_KERNEL::Exception)
{
_fields.resize(newSize);
std::string getLocalization() const;
void setLocalization(const char *newLocName);
int getLocId() const { return _loc_id; }
+ void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
+ void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
void getFieldAtLevel(TypeOfField type, const MEDFieldFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs,
std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const;
void fillValues(int discId, int& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
std::vector<std::string> getLocsReallyUsed() const;
std::vector<std::string> getPflsReallyUsedMulti() const;
std::vector<std::string> getLocsReallyUsedMulti() const;
+ void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
+ void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(int locId) throw(INTERP_KERNEL::Exception);
const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(int locId) const throw(INTERP_KERNEL::Exception);
void getFieldAtLevel(int meshDim, TypeOfField type, const MEDFieldFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const;
std::vector<std::string> getLocsReallyUsed() const;
std::vector<std::string> getPflsReallyUsedMulti() const;
std::vector<std::string> getLocsReallyUsedMulti() const;
+ void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
+ void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDFieldFieldGlobsReal *glob, const MEDCouplingMesh *mesh, bool& isPfl) const throw(INTERP_KERNEL::Exception);
DataArrayDouble *getFieldOnMeshAtLevelWithPfl(TypeOfField type, const MEDCouplingMesh *mesh, DataArrayInt *&pfl, const MEDFieldFieldGlobsReal *glob) const throw(INTERP_KERNEL::Exception);
DataArrayDouble *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const throw(INTERP_KERNEL::Exception);
std::vector<std::string> getLocs() const;
bool existsPfl(const char *pflName) const;
bool existsLoc(const char *locName) const;
+ std::vector< std::vector<int> > whichAreEqualProfiles() const;
+ std::vector< std::vector<int> > whichAreEqualLocs(double eps) const;
void setFileName(const char *fileName);
+ void changePflsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
+ void changeLocsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
int getNbOfGaussPtPerCell(int locId) const throw(INTERP_KERNEL::Exception);
int getLocalizationId(const char *loc) const throw(INTERP_KERNEL::Exception);
const char *getFileName() const { return _file_name.c_str(); }
std::string getFileName2() const { return _file_name; }
const MEDFileFieldLoc& getLocalizationFromId(int locId) const throw(INTERP_KERNEL::Exception);
const MEDFileFieldLoc& getLocalization(const char *locName) const throw(INTERP_KERNEL::Exception);
+ const DataArrayInt *getProfileFromId(int pflId) const throw(INTERP_KERNEL::Exception);
const DataArrayInt *getProfile(const char *pflName) const throw(INTERP_KERNEL::Exception);
MEDFileFieldLoc& getLocalizationFromId(int locId) throw(INTERP_KERNEL::Exception);
MEDFileFieldLoc& getLocalization(const char *locName) throw(INTERP_KERNEL::Exception);
DataArrayInt *getProfile(const char *pflName) throw(INTERP_KERNEL::Exception);
+ DataArrayInt *getProfileFromId(int pflId) throw(INTERP_KERNEL::Exception);
+ void killProfileIds(const std::vector<int>& pflIds) throw(INTERP_KERNEL::Exception);
+ void killLocalizationIds(const std::vector<int>& locIds) throw(INTERP_KERNEL::Exception);
//
void appendProfile(DataArrayInt *pfl) throw(INTERP_KERNEL::Exception);
void appendLoc(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w) throw(INTERP_KERNEL::Exception);
virtual std::vector<std::string> getLocsReallyUsed() const = 0;
virtual std::vector<std::string> getPflsReallyUsedMulti() const = 0;
virtual std::vector<std::string> getLocsReallyUsedMulti() const = 0;
+ virtual void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception) = 0;
+ virtual void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception) = 0;
virtual ~MEDFieldFieldGlobsReal();
//
void loadProfileInFile(med_idt fid, int id, const char *pflName) throw(INTERP_KERNEL::Exception);
std::vector<std::string> getLocs() const;
bool existsPfl(const char *pflName) const;
bool existsLoc(const char *locName) const;
+ std::vector< std::vector<int> > whichAreEqualProfiles() const;
+ std::vector< std::vector<int> > whichAreEqualLocs(double eps) const;
void setFileName(const char *fileName);
+ void changePflsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
+ void changeLocsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
+ void changePflsNames(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
+ void changeLocsNames(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
+ void changePflName(const char *oldName, const char *newName) throw(INTERP_KERNEL::Exception);
+ void changeLocName(const char *oldName, const char *newName) throw(INTERP_KERNEL::Exception);
+ std::vector< std::pair<std::vector<std::string>, std::string > > zipPflsNames() throw(INTERP_KERNEL::Exception);
+ std::vector< std::pair<std::vector<std::string>, std::string > > zipLocsNames(double eps) throw(INTERP_KERNEL::Exception);
int getNbOfGaussPtPerCell(int locId) const throw(INTERP_KERNEL::Exception);
int getLocalizationId(const char *loc) const throw(INTERP_KERNEL::Exception);
const char *getFileName() const;
std::string getFileName2() const;
const MEDFileFieldLoc& getLocalizationFromId(int locId) const throw(INTERP_KERNEL::Exception);
const MEDFileFieldLoc& getLocalization(const char *locName) const throw(INTERP_KERNEL::Exception);
- const DataArrayInt *getProfile(const char *pflName) const throw(INTERP_KERNEL::Exception);
MEDFileFieldLoc& getLocalizationFromId(int locId) throw(INTERP_KERNEL::Exception);
MEDFileFieldLoc& getLocalization(const char *locName) throw(INTERP_KERNEL::Exception);
+ const DataArrayInt *getProfile(const char *pflName) const throw(INTERP_KERNEL::Exception);
+ const DataArrayInt *getProfileFromId(int pflId) const throw(INTERP_KERNEL::Exception);
DataArrayInt *getProfile(const char *pflName) throw(INTERP_KERNEL::Exception);
+ DataArrayInt *getProfileFromId(int pflId) throw(INTERP_KERNEL::Exception);
+ void killProfileIds(const std::vector<int>& pflIds) throw(INTERP_KERNEL::Exception);
+ void killLocalizationIds(const std::vector<int>& locIds) throw(INTERP_KERNEL::Exception);
//
void appendProfile(DataArrayInt *pfl) throw(INTERP_KERNEL::Exception);
void appendLoc(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w) throw(INTERP_KERNEL::Exception);
std::vector<std::string> getLocsReallyUsed2() const;
std::vector<std::string> getPflsReallyUsedMulti2() const;
std::vector<std::string> getLocsReallyUsedMulti2() const;
+ void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
+ void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
static void CheckMeshDimRel(int meshDimRelToMax) throw(INTERP_KERNEL::Exception);
static std::vector<int> CheckSBTMesh(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
//
std::vector<std::string> getLocsReallyUsed() const;
std::vector<std::string> getPflsReallyUsedMulti() const;
std::vector<std::string> getLocsReallyUsedMulti() const;
+ void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
+ void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
MEDFileField1TS(const char *fileName, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
MEDFileField1TS();
};
std::vector<std::string> getLocsReallyUsed2() const;
std::vector<std::string> getPflsReallyUsedMulti2() const;
std::vector<std::string> getLocsReallyUsedMulti2() const;
+ void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
+ void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
protected:
const MEDFileField1TSWithoutDAS& getTimeStepEntry(int iteration, int order) const throw(INTERP_KERNEL::Exception);
MEDFileField1TSWithoutDAS& getTimeStepEntry(int iteration, int order) throw(INTERP_KERNEL::Exception);
std::vector<std::string> getLocsReallyUsed() const;
std::vector<std::string> getPflsReallyUsedMulti() const;
std::vector<std::string> getLocsReallyUsedMulti() const;
+ void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
+ void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
private:
MEDFileFieldMultiTS();
MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutDAS& other);
std::vector<std::string> getLocsReallyUsed() const;
std::vector<std::string> getPflsReallyUsedMulti() const;
std::vector<std::string> getLocsReallyUsedMulti() const;
+ void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
+ void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
private:
MEDFileFields();
MEDFileFields(const char *fileName) throw(INTERP_KERNEL::Exception);