From 005acdd6e4b1014043a7fae2dfcbb6e81e824322 Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 4 Jan 2013 15:03:10 +0000 Subject: [PATCH] MEDFileField*::deepCpy --- src/MEDLoader/MEDFileField.cxx | 142 ++++++++++++++++++++++++--- src/MEDLoader/MEDFileField.hxx | 19 +++- src/MEDLoader/Swig/MEDLoaderCommon.i | 7 ++ 3 files changed, 153 insertions(+), 15 deletions(-) diff --git a/src/MEDLoader/MEDFileField.cxx b/src/MEDLoader/MEDFileField.cxx index 1f14a7a30..ec6cbebcf 100644 --- a/src/MEDLoader/MEDFileField.cxx +++ b/src/MEDLoader/MEDFileField.cxx @@ -100,6 +100,11 @@ MEDFileFieldLoc::MEDFileFieldLoc(const char *locName, INTERP_KERNEL::NormalizedC _nb_gauss_pt=_w.size(); } +MEDFileFieldLoc *MEDFileFieldLoc::deepCpy() const +{ + return new MEDFileFieldLoc(*this); +} + void MEDFileFieldLoc::simpleRepr(std::ostream& oss) const { static const char OFF7[]="\n "; @@ -390,6 +395,13 @@ MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypePerDisc::New(const return new MEDFileFieldPerMeshPerTypePerDisc(other); } +MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypePerDisc::deepCpy(MEDFileFieldPerMeshPerType *father) const throw(INTERP_KERNEL::Exception) +{ + MEDCouplingAutoRefCountObjectPtr ret=new MEDFileFieldPerMeshPerTypePerDisc(*this); + ret->_father=father; + return ret.retn(); +} + MEDFileFieldPerMeshPerTypePerDisc::MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerType *fath, TypeOfField atype, int profileIt) throw(INTERP_KERNEL::Exception) try:_type(atype),_father(fath) { @@ -919,6 +931,19 @@ MEDFileFieldPerMeshPerType *MEDFileFieldPerMeshPerType::New(MEDFileFieldPerMesh return new MEDFileFieldPerMeshPerType(fath,geoType); } +MEDFileFieldPerMeshPerType *MEDFileFieldPerMeshPerType::deepCpy(MEDFileFieldPerMesh *father) const throw(INTERP_KERNEL::Exception) +{ + MEDCouplingAutoRefCountObjectPtr ret=new MEDFileFieldPerMeshPerType(*this); + ret->_father=father; + std::size_t i=0; + for(std::vector< MEDCouplingAutoRefCountObjectPtr >::const_iterator it=_field_pm_pt_pd.begin();it!=_field_pm_pt_pd.end();it++,i++) + { + if((const MEDFileFieldPerMeshPerTypePerDisc *)*it) + ret->_field_pm_pt_pd[i]=(*it)->deepCpy(const_cast(this)); + } + return ret.retn(); +} + void MEDFileFieldPerMeshPerType::assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldDouble *field, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception) { std::vector pos=addNewEntryIfNecessary(field,offset,nbOfCells); @@ -1426,6 +1451,19 @@ MEDFileFieldPerMesh *MEDFileFieldPerMesh::New(MEDFileField1TSWithoutSDA *fath, c return new MEDFileFieldPerMesh(fath,mesh); } +MEDFileFieldPerMesh *MEDFileFieldPerMesh::deepCpy(MEDFileField1TSWithoutSDA *father) const throw(INTERP_KERNEL::Exception) +{ + MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh > ret=new MEDFileFieldPerMesh(*this); + ret->_father=father; + std::size_t i=0; + for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerType > >::const_iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++,i++) + { + if((const MEDFileFieldPerMeshPerType *)*it) + ret->_field_pm_pt[i]=(*it)->deepCpy(const_cast(this)); + } + return ret.retn(); +} + void MEDFileFieldPerMesh::simpleRepr(int bkOffset, std::ostream& oss, int id) const { std::string startLine(bkOffset,' '); @@ -2355,6 +2393,24 @@ MEDFileFieldGlobs *MEDFileFieldGlobs::New() return new MEDFileFieldGlobs; } +MEDFileFieldGlobs *MEDFileFieldGlobs::deepCpy() const throw(INTERP_KERNEL::Exception) +{ + MEDCouplingAutoRefCountObjectPtr ret=new MEDFileFieldGlobs(*this); + std::size_t i=0; + for(std::vector< MEDCouplingAutoRefCountObjectPtr >::const_iterator it=_pfls.begin();it!=_pfls.end();it++,i++) + { + if((const DataArrayInt *)*it) + ret->_pfls[i]=(*it)->deepCpy(); + } + i=0; + for(std::vector< MEDCouplingAutoRefCountObjectPtr >::const_iterator it=_locs.begin();it!=_locs.end();it++,i++) + { + if((const MEDFileFieldLoc*)*it) + ret->_locs[i]=(*it)->deepCpy(); + } + return ret.retn(); +} + MEDFileFieldGlobs::MEDFileFieldGlobs(const char *fname):_file_name(fname) { } @@ -2733,6 +2789,13 @@ void MEDFileFieldGlobsReal::shallowCpyGlobs(const MEDFileFieldGlobsReal& other) _globals=other._globals; } +void MEDFileFieldGlobsReal::deepCpyGlobs(const MEDFileFieldGlobsReal& other) +{ + _globals=other._globals; + if((const MEDFileFieldGlobs *)_globals) + _globals=other._globals->deepCpy(); +} + void MEDFileFieldGlobsReal::appendGlobs(const MEDFileFieldGlobsReal& other, double eps) throw(INTERP_KERNEL::Exception) { _globals->appendGlobs(*other._globals,eps); @@ -3709,6 +3772,20 @@ const MEDFileFieldPerMeshPerTypePerDisc *MEDFileField1TSWithoutSDA::getLeafGiven return _field_per_mesh[mid]->getLeafGivenTypeAndLocId(typ,locId); } +MEDFileField1TSWithoutSDA *MEDFileField1TSWithoutSDA::deepCpy() const throw(INTERP_KERNEL::Exception) +{ + MEDCouplingAutoRefCountObjectPtr ret=new MEDFileField1TSWithoutSDA(*this); + if((const DataArrayDouble *)_arr) + ret->_arr=_arr->deepCpy(); + std::size_t i=0; + for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh > >::const_iterator it=_field_per_mesh.begin();it!=_field_per_mesh.end();it++,i++) + { + if((const MEDFileFieldPerMesh *)*it) + ret->_field_per_mesh[i]=(*it)->deepCpy(const_cast(this)); + } + return ret.retn(); +} + DataArrayDouble *MEDFileField1TSWithoutSDA::getOrCreateAndGetArray() { DataArrayDouble *ret=_arr; @@ -3736,9 +3813,9 @@ MEDFileField1TS *MEDFileField1TS::New(const char *fileName, const char *fieldNam /*! * \warning this is a shallow copy constructor */ -MEDFileField1TS *MEDFileField1TS::New(const MEDFileField1TSWithoutSDA& other, bool deepCpy) +MEDFileField1TS *MEDFileField1TS::New(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent) { - return new MEDFileField1TS(other,deepCpy); + return new MEDFileField1TS(other,shallowCopyOfContent); } MEDFileField1TS *MEDFileField1TS::New() @@ -3856,9 +3933,9 @@ catch(INTERP_KERNEL::Exception& e) /*! * \warning this is a shallow copy constructor */ -MEDFileField1TS::MEDFileField1TS(const MEDFileField1TSWithoutSDA& other, bool deepCpy) +MEDFileField1TS::MEDFileField1TS(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent) { - if(!deepCpy) + if(!shallowCopyOfContent) { const MEDFileField1TSWithoutSDA *otherPtr(&other); otherPtr->incrRef(); @@ -4084,6 +4161,15 @@ void MEDFileField1TS::setLocNameOnLeaf(const char *mName, INTERP_KERNEL::Normali } } +MEDFileField1TS *MEDFileField1TS::deepCpy() const throw(INTERP_KERNEL::Exception) +{ + MEDCouplingAutoRefCountObjectPtr ret=new MEDFileField1TS(*this); + if((const MEDFileField1TSWithoutSDA *)_content) + ret->_content=_content->deepCpy(); + ret->deepCpyGlobs(*this); + return ret.retn(); +} + int MEDFileField1TS::copyTinyInfoFrom(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception) { return _content->copyTinyInfoFrom(field); @@ -4282,9 +4368,21 @@ try:_name(fieldName),_infos(infos),_field_type(ft) finishLoading(fid,nbOfStep); } catch(INTERP_KERNEL::Exception& e) - { - throw e; - } +{ + throw e; +} + +MEDFileFieldMultiTSWithoutSDA *MEDFileFieldMultiTSWithoutSDA::deepCpy() const throw(INTERP_KERNEL::Exception) +{ + MEDCouplingAutoRefCountObjectPtr ret=new MEDFileFieldMultiTSWithoutSDA(*this); + std::size_t i=0; + for(std::vector< MEDCouplingAutoRefCountObjectPtr >::const_iterator it=_time_steps.begin();it!=_time_steps.end();it++,i++) + { + if((const MEDFileField1TSWithoutSDA *)*it) + ret->_time_steps[i]=(*it)->deepCpy(); + } + return ret.retn(); +} const std::vector& MEDFileFieldMultiTSWithoutSDA::getInfo() const throw(INTERP_KERNEL::Exception) { @@ -4817,9 +4915,18 @@ MEDFileFieldMultiTS *MEDFileFieldMultiTS::New(const char *fileName, const char * return new MEDFileFieldMultiTS(fileName,fieldName); } -MEDFileFieldMultiTS *MEDFileFieldMultiTS::New(const MEDFileFieldMultiTSWithoutSDA& other, bool deepCpy) +MEDFileFieldMultiTS *MEDFileFieldMultiTS::New(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent) { - return new MEDFileFieldMultiTS(other,deepCpy); + return new MEDFileFieldMultiTS(other,shallowCopyOfContent); +} + +MEDFileFieldMultiTS *MEDFileFieldMultiTS::deepCpy() const throw(INTERP_KERNEL::Exception) +{ + MEDCouplingAutoRefCountObjectPtr ret=new MEDFileFieldMultiTS(*this); + if((const MEDFileFieldMultiTSWithoutSDA *)_content) + ret->_content=_content->deepCpy(); + ret->deepCpyGlobs(*this); + return ret.retn(); } MEDFileField1TS *MEDFileFieldMultiTS::getTimeStepAtPos(int pos) const throw(INTERP_KERNEL::Exception) @@ -5002,9 +5109,9 @@ catch(INTERP_KERNEL::Exception& e) throw e; } -MEDFileFieldMultiTS::MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutSDA& other, bool deepCpy) +MEDFileFieldMultiTS::MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent) { - if(!deepCpy) + if(!shallowCopyOfContent) { const MEDFileFieldMultiTSWithoutSDA *otherPtr(&other); otherPtr->incrRef(); @@ -5183,6 +5290,19 @@ MEDFileFields *MEDFileFields::New(const char *fileName) throw(INTERP_KERNEL::Exc return new MEDFileFields(fileName); } +MEDFileFields *MEDFileFields::deepCpy() const throw(INTERP_KERNEL::Exception) +{ + MEDCouplingAutoRefCountObjectPtr ret=new MEDFileFields(*this); + std::size_t i=0; + for( std::vector< MEDCouplingAutoRefCountObjectPtr >::const_iterator it=_fields.begin();it!=_fields.end();it++,i++) + { + if((const MEDFileFieldMultiTSWithoutSDA*)*it) + ret->_fields[i]=(*it)->deepCpy(); + } + ret->deepCpyGlobs(*this); + return ret.retn(); +} + int MEDFileFields::getNumberOfFields() const { return _fields.size(); diff --git a/src/MEDLoader/MEDFileField.hxx b/src/MEDLoader/MEDFileField.hxx index 3b72f44ff..85ebcd3fa 100644 --- a/src/MEDLoader/MEDFileField.hxx +++ b/src/MEDLoader/MEDFileField.hxx @@ -54,6 +54,7 @@ namespace ParaMEDMEM static MEDFileFieldLoc *New(med_idt fid, const char *locName); static MEDFileFieldLoc *New(med_idt fid, int id); static MEDFileFieldLoc *New(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector& refCoo, const std::vector& gsCoo, const std::vector& w); + MEDFileFieldLoc *deepCpy() const; int MEDLOADER_EXPORT getNbOfGaussPtPerCell() const { return _nb_gauss_pt; } void MEDLOADER_EXPORT writeLL(med_idt fid) const; std::string MEDLOADER_EXPORT repr() const; @@ -92,6 +93,7 @@ namespace ParaMEDMEM static MEDFileFieldPerMeshPerTypePerDisc *NewOnRead(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int profileIt) throw(INTERP_KERNEL::Exception); static MEDFileFieldPerMeshPerTypePerDisc *New(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int locId); static MEDFileFieldPerMeshPerTypePerDisc *New(const MEDFileFieldPerMeshPerTypePerDisc& other); + MEDFileFieldPerMeshPerTypePerDisc *deepCpy(MEDFileFieldPerMeshPerType *father) const throw(INTERP_KERNEL::Exception); void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldDouble *field, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception); void assignFieldProfile(int& start, const DataArrayInt *multiTypePfl, const DataArrayInt *idsInPfl, DataArrayInt *locIds, int nbOfEltsInWholeMesh, const MEDCouplingFieldDouble *field, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception); void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception); @@ -164,6 +166,7 @@ namespace ParaMEDMEM public: static MEDFileFieldPerMeshPerType *New(MEDFileFieldPerMesh *fath, INTERP_KERNEL::NormalizedCellType geoType) throw(INTERP_KERNEL::Exception); static MEDFileFieldPerMeshPerType *NewOnRead(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType) throw(INTERP_KERNEL::Exception); + MEDFileFieldPerMeshPerType *deepCpy(MEDFileFieldPerMesh *father) const throw(INTERP_KERNEL::Exception); void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldDouble *field, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception); void assignFieldProfile(int& start, const DataArrayInt *multiTypePfl, const DataArrayInt *idsInPfl, DataArrayInt *locIds, int nbOfEltsInWholeMesh, const MEDCouplingFieldDouble *field, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception); void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception); @@ -217,6 +220,7 @@ namespace ParaMEDMEM public: static MEDFileFieldPerMesh *New(MEDFileField1TSWithoutSDA *fath, const MEDCouplingMesh *mesh); static MEDFileFieldPerMesh *NewOnRead(med_idt fid, MEDFileField1TSWithoutSDA *fath, int meshCsit, int meshIteration, int meshOrder) throw(INTERP_KERNEL::Exception); + MEDFileFieldPerMesh *deepCpy(MEDFileField1TSWithoutSDA *_father) const throw(INTERP_KERNEL::Exception); void simpleRepr(int bkOffset,std::ostream& oss, int id) const; void copyTinyInfoFrom(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception); void assignFieldProfile(int& start, const DataArrayInt *multiTypePfl, const std::vector& code, const std::vector& code2, const std::vector& idsInPflPerType, const std::vector& idsPerType, const MEDCouplingFieldDouble *field, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception); @@ -289,6 +293,7 @@ namespace ParaMEDMEM public: static MEDFileFieldGlobs *New(const char *fname); static MEDFileFieldGlobs *New(); + MEDFileFieldGlobs *deepCpy() const throw(INTERP_KERNEL::Exception); void simpleRepr(std::ostream& oss) const; void appendGlobs(const MEDFileFieldGlobs& other, double eps) throw(INTERP_KERNEL::Exception); void loadProfileInFile(med_idt fid, int id, const char *pflName) throw(INTERP_KERNEL::Exception); @@ -345,6 +350,7 @@ namespace ParaMEDMEM MEDFileFieldGlobsReal(); void simpleRepr(std::ostream& oss) const; void shallowCpyGlobs(const MEDFileFieldGlobsReal& other); + void deepCpyGlobs(const MEDFileFieldGlobsReal& other); void appendGlobs(const MEDFileFieldGlobsReal& other, double eps) throw(INTERP_KERNEL::Exception); virtual std::vector getPflsReallyUsed() const = 0; virtual std::vector getLocsReallyUsed() const = 0; @@ -460,6 +466,7 @@ namespace ParaMEDMEM public: MEDFileField1TSWithoutSDA(); MEDFileField1TSWithoutSDA(const char *fieldName, int csit, int fieldtype, int iteration, int order, const std::vector& infos); + MEDFileField1TSWithoutSDA *deepCpy() const throw(INTERP_KERNEL::Exception); DataArrayDouble *getOrCreateAndGetArray(); const DataArrayDouble *getOrCreateAndGetArray() const; protected: @@ -483,7 +490,7 @@ namespace ParaMEDMEM { public: static MEDFileField1TS *New(const char *fileName, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception); - static MEDFileField1TS *New(const MEDFileField1TSWithoutSDA& other, bool deepCpy); + static MEDFileField1TS *New(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent); static MEDFileField1TS *New(); std::string simpleRepr() const; void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception); @@ -498,6 +505,7 @@ namespace ParaMEDMEM void setFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception); // direct forwarding to MEDFileField1TSWithoutSDA instance _content public: + MEDFileField1TS *deepCpy() const throw(INTERP_KERNEL::Exception); int copyTinyInfoFrom(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception); int getDimension() const; int getIteration() const; @@ -544,7 +552,7 @@ namespace ParaMEDMEM private: void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception); MEDFileField1TS(const char *fileName, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception); - MEDFileField1TS(const MEDFileField1TSWithoutSDA& other, bool deepCpy); + MEDFileField1TS(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent); MEDFileField1TS(); protected: MEDCouplingAutoRefCountObjectPtr _content; @@ -555,6 +563,7 @@ namespace ParaMEDMEM public: static MEDFileFieldMultiTSWithoutSDA *New(med_idt fid, const char *fieldName, int id, int ft, const std::vector& infos, int nbOfStep) throw(INTERP_KERNEL::Exception); MEDFileFieldMultiTSWithoutSDA(med_idt fid, int fieldId) throw(INTERP_KERNEL::Exception); + MEDFileFieldMultiTSWithoutSDA *deepCpy() const throw(INTERP_KERNEL::Exception); int getNumberOfTS() const; void eraseEmptyTS() throw(INTERP_KERNEL::Exception); void eraseTimeStepIds(const int *startIds, const int *endIds) throw(INTERP_KERNEL::Exception); @@ -618,7 +627,8 @@ namespace ParaMEDMEM static MEDFileFieldMultiTS *New(); static MEDFileFieldMultiTS *New(const char *fileName) throw(INTERP_KERNEL::Exception); static MEDFileFieldMultiTS *New(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception); - static MEDFileFieldMultiTS *New(const MEDFileFieldMultiTSWithoutSDA& other, bool deepCpy); + static MEDFileFieldMultiTS *New(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent); + MEDFileFieldMultiTS *deepCpy() const throw(INTERP_KERNEL::Exception); // MEDFileField1TS *getTimeStepAtPos(int pos) const throw(INTERP_KERNEL::Exception); MEDFileField1TS *getTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception); @@ -669,7 +679,7 @@ std::vector< std::vector > getFieldSplitedByType2(int iterati MEDCouplingAutoRefCountObjectPtr getContent(); private: MEDFileFieldMultiTS(); - MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutSDA& other, bool deepCpy); + MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent); MEDFileFieldMultiTS(const char *fileName) throw(INTERP_KERNEL::Exception); MEDFileFieldMultiTS(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception); protected: @@ -698,6 +708,7 @@ std::vector< std::vector > getFieldSplitedByType2(int iterati public: static MEDFileFields *New(); static MEDFileFields *New(const char *fileName) throw(INTERP_KERNEL::Exception); + MEDFileFields *deepCpy() const throw(INTERP_KERNEL::Exception); void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception); void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception); int getNumberOfFields() const; diff --git a/src/MEDLoader/Swig/MEDLoaderCommon.i b/src/MEDLoader/Swig/MEDLoaderCommon.i index 51cc4c8fc..4710e3baf 100644 --- a/src/MEDLoader/Swig/MEDLoaderCommon.i +++ b/src/MEDLoader/Swig/MEDLoaderCommon.i @@ -88,11 +88,13 @@ using namespace ParaMEDMEM; %newobject ParaMEDMEM::MEDFileMeshes::__iter__; %newobject ParaMEDMEM::MEDFileFields::New; +%newobject ParaMEDMEM::MEDFileFields::deepCpy; %newobject ParaMEDMEM::MEDFileFields::getFieldWithName; %newobject ParaMEDMEM::MEDFileFields::getFieldAtPos; %newobject ParaMEDMEM::MEDFileFields::__getitem__; %newobject ParaMEDMEM::MEDFileFields::__iter__; %newobject ParaMEDMEM::MEDFileFieldMultiTS::New; +%newobject ParaMEDMEM::MEDFileFieldMultiTS::deepCpy; %newobject ParaMEDMEM::MEDFileFieldMultiTS::getTimeStepAtPos; %newobject ParaMEDMEM::MEDFileFieldMultiTS::getTimeStep; %newobject ParaMEDMEM::MEDFileFieldMultiTS::getTimeStepGivenTime; @@ -104,6 +106,7 @@ using namespace ParaMEDMEM; %newobject ParaMEDMEM::MEDFileFieldMultiTS::getFieldAtLevelOld; %newobject ParaMEDMEM::MEDFileFieldMultiTS::getUndergroundDataArray; %newobject ParaMEDMEM::MEDFileField1TS::New; +%newobject ParaMEDMEM::MEDFileField1TS::deepCpy; %newobject ParaMEDMEM::MEDFileField1TS::getFieldAtLevel; %newobject ParaMEDMEM::MEDFileField1TS::getFieldAtTopLevel; %newobject ParaMEDMEM::MEDFileField1TS::getFieldOnMeshAtLevel; @@ -827,6 +830,7 @@ namespace ParaMEDMEM { public: void shallowCpyGlobs(const MEDFileFieldGlobsReal& other) throw(INTERP_KERNEL::Exception); + void deepCpyGlobs(const MEDFileFieldGlobsReal& other) throw(INTERP_KERNEL::Exception); std::vector getPfls() const throw(INTERP_KERNEL::Exception); std::vector getLocs() const throw(INTERP_KERNEL::Exception); bool existsPfl(const char *pflName) const throw(INTERP_KERNEL::Exception); @@ -944,6 +948,7 @@ namespace ParaMEDMEM void setProfileNameOnLeaf(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const char *newPflName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception); void setLocNameOnLeaf(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const char *newLocName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception); void copyTinyInfoFrom(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception); + MEDFileField1TS *deepCpy() const throw(INTERP_KERNEL::Exception); // int getDimension() const throw(INTERP_KERNEL::Exception); int getIteration() const throw(INTERP_KERNEL::Exception); @@ -1169,6 +1174,7 @@ namespace ParaMEDMEM static MEDFileFieldMultiTS *New() throw(INTERP_KERNEL::Exception); static MEDFileFieldMultiTS *New(const char *fileName) throw(INTERP_KERNEL::Exception); static MEDFileFieldMultiTS *New(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception); + MEDFileFieldMultiTS *deepCpy() const throw(INTERP_KERNEL::Exception); // MEDFileField1TS *getTimeStepAtPos(int pos) const throw(INTERP_KERNEL::Exception); MEDFileField1TS *getTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception); @@ -1554,6 +1560,7 @@ namespace ParaMEDMEM public: static MEDFileFields *New() throw(INTERP_KERNEL::Exception); static MEDFileFields *New(const char *fileName) throw(INTERP_KERNEL::Exception); + MEDFileFields *deepCpy() const throw(INTERP_KERNEL::Exception); void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception); int getNumberOfFields() const; std::vector getFieldsNames() const throw(INTERP_KERNEL::Exception); -- 2.39.2