From: ageay Date: Fri, 26 Jul 2013 13:50:34 +0000 (+0000) Subject: MEDReader ready -> debug in process X-Git-Tag: B4PolyhIntersect~40 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e7ea2db17ebbde43a670f15030032d4dd0362101;p=modules%2Fmed.git MEDReader ready -> debug in process --- diff --git a/src/MEDLoader/MEDFileField.cxx b/src/MEDLoader/MEDFileField.cxx index dfff9dbca..57afa853e 100644 --- a/src/MEDLoader/MEDFileField.cxx +++ b/src/MEDLoader/MEDFileField.cxx @@ -4177,7 +4177,7 @@ void MEDFileAnyTypeField1TSWithoutSDA::loadStructureAndBigArraysRecursively(med_ loadBigArraysRecursively(fid,nasc); } -void MEDFileAnyTypeField1TSWithoutSDA::releaseArrays() throw(INTERP_KERNEL::Exception) +void MEDFileAnyTypeField1TSWithoutSDA::unloadArrays() throw(INTERP_KERNEL::Exception) { DataArray *thisArr(getUndergroundDataArray()); if(thisArr && thisArr->isAllocated()) @@ -5525,7 +5525,7 @@ void MEDFileAnyTypeField1TS::loadArrays() throw(INTERP_KERNEL::Exception) * But once data loaded once, this method does nothing. * * \throw If the fileName is not set or points to a non readable MED file. - * \sa MEDFileAnyTypeField1TS::loadArrays, MEDFileAnyTypeField1TS::releaseArrays + * \sa MEDFileAnyTypeField1TS::loadArrays, MEDFileAnyTypeField1TS::unloadArrays */ void MEDFileAnyTypeField1TS::loadArraysIfNecessary() throw(INTERP_KERNEL::Exception) { @@ -5539,9 +5539,9 @@ void MEDFileAnyTypeField1TS::loadArraysIfNecessary() throw(INTERP_KERNEL::Except * * \sa MEDFileAnyTypeField1TS::loadArrays, MEDFileAnyTypeField1TS::loadArraysIfNecessary */ -void MEDFileAnyTypeField1TS::releaseArrays() throw(INTERP_KERNEL::Exception) +void MEDFileAnyTypeField1TS::unloadArrays() throw(INTERP_KERNEL::Exception) { - contentNotNullBase()->releaseArrays(); + contentNotNullBase()->unloadArrays(); } void MEDFileAnyTypeField1TS::writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception) @@ -7029,13 +7029,13 @@ void MEDFileAnyTypeFieldMultiTSWithoutSDA::loadBigArraysRecursivelyIfNecessary(m } } -void MEDFileAnyTypeFieldMultiTSWithoutSDA::releaseArrays() throw(INTERP_KERNEL::Exception) +void MEDFileAnyTypeFieldMultiTSWithoutSDA::unloadArrays() throw(INTERP_KERNEL::Exception) { for(std::vector< MEDCouplingAutoRefCountObjectPtr >::iterator it=_time_steps.begin();it!=_time_steps.end();it++) { MEDFileAnyTypeField1TSWithoutSDA *elt(*it); if(elt) - elt->releaseArrays(); + elt->unloadArrays(); } } @@ -8089,7 +8089,7 @@ void MEDFileAnyTypeFieldMultiTS::loadArrays() throw(INTERP_KERNEL::Exception) * But once data loaded once, this method does nothing. * * \throw If the fileName is not set or points to a non readable MED file. - * \sa MEDFileAnyTypeFieldMultiTS::loadArrays, MEDFileAnyTypeFieldMultiTS::releaseArrays + * \sa MEDFileAnyTypeFieldMultiTS::loadArrays, MEDFileAnyTypeFieldMultiTS::unloadArrays */ void MEDFileAnyTypeFieldMultiTS::loadArraysIfNecessary() throw(INTERP_KERNEL::Exception) { @@ -8103,9 +8103,9 @@ void MEDFileAnyTypeFieldMultiTS::loadArraysIfNecessary() throw(INTERP_KERNEL::Ex * * \sa MEDFileAnyTypeFieldMultiTS::loadArrays, MEDFileAnyTypeFieldMultiTS::loadArraysIfNecessary */ -void MEDFileAnyTypeFieldMultiTS::releaseArrays() throw(INTERP_KERNEL::Exception) +void MEDFileAnyTypeFieldMultiTS::unloadArrays() throw(INTERP_KERNEL::Exception) { - contentNotNullBase()->releaseArrays(); + contentNotNullBase()->unloadArrays(); } std::string MEDFileAnyTypeFieldMultiTS::simpleRepr() const @@ -9513,7 +9513,7 @@ void MEDFileFields::loadArrays() throw(INTERP_KERNEL::Exception) * But once data loaded once, this method does nothing. * * \throw If the fileName is not set or points to a non readable MED file. - * \sa MEDFileFields::loadArrays, MEDFileFields::releaseArrays + * \sa MEDFileFields::loadArrays, MEDFileFields::unloadArrays */ void MEDFileFields::loadArraysIfNecessary() throw(INTERP_KERNEL::Exception) { @@ -9532,14 +9532,14 @@ void MEDFileFields::loadArraysIfNecessary() throw(INTERP_KERNEL::Exception) * * \sa MEDFileFields::loadArrays, MEDFileFields::loadArraysIfNecessary */ -void MEDFileFields::releaseArrays() throw(INTERP_KERNEL::Exception) +void MEDFileFields::unloadArrays() throw(INTERP_KERNEL::Exception) { MEDFileUtilities::AutoFid fid=MEDfileOpen(getFileName(),MED_ACC_RDONLY); for(std::vector< MEDCouplingAutoRefCountObjectPtr >::iterator it=_fields.begin();it!=_fields.end();it++) { MEDFileAnyTypeFieldMultiTSWithoutSDA *elt(*it); if(elt) - elt->releaseArrays(); + elt->unloadArrays(); } } diff --git a/src/MEDLoader/MEDFileField.hxx b/src/MEDLoader/MEDFileField.hxx index 2f6e1ae38..d745a8eef 100644 --- a/src/MEDLoader/MEDFileField.hxx +++ b/src/MEDLoader/MEDFileField.hxx @@ -514,7 +514,7 @@ namespace ParaMEDMEM void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception); void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception); void loadStructureAndBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception); - void releaseArrays() throw(INTERP_KERNEL::Exception); + void unloadArrays() throw(INTERP_KERNEL::Exception); void writeLL(med_idt fid, const MEDFileWritable& opts, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception); protected: int getMeshIdFromMeshName(const char *mName) const throw(INTERP_KERNEL::Exception); @@ -655,7 +655,7 @@ namespace ParaMEDMEM void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception); void loadArrays() throw(INTERP_KERNEL::Exception); void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception); - void releaseArrays() throw(INTERP_KERNEL::Exception); + void unloadArrays() throw(INTERP_KERNEL::Exception); std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeField1TS > > splitComponents() const throw(INTERP_KERNEL::Exception); std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeField1TS > > splitDiscretizations() const throw(INTERP_KERNEL::Exception); MEDFileAnyTypeField1TS *deepCpy() const throw(INTERP_KERNEL::Exception); @@ -818,7 +818,7 @@ namespace ParaMEDMEM void writeLL(med_idt fid, const MEDFileWritable& opts) const throw(INTERP_KERNEL::Exception); void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception); void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception); - void releaseArrays() throw(INTERP_KERNEL::Exception); + void unloadArrays() throw(INTERP_KERNEL::Exception); public: const MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos) const throw(INTERP_KERNEL::Exception); MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos) throw(INTERP_KERNEL::Exception); @@ -901,7 +901,7 @@ namespace ParaMEDMEM static MEDFileAnyTypeFieldMultiTS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception); void loadArrays() throw(INTERP_KERNEL::Exception); void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception); - void releaseArrays() throw(INTERP_KERNEL::Exception); + void unloadArrays() 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); std::size_t getHeapMemorySize() const; @@ -1071,7 +1071,7 @@ std::vector< std::vector > getFieldSplitedByType2(int iterati void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception); void loadArrays() throw(INTERP_KERNEL::Exception); void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception); - void releaseArrays() throw(INTERP_KERNEL::Exception); + void unloadArrays() throw(INTERP_KERNEL::Exception); int getNumberOfFields() const; std::vector< std::pair > getCommonIterations(bool& areThereSomeForgottenTS) const throw(INTERP_KERNEL::Exception); std::vector getFieldsNames() const throw(INTERP_KERNEL::Exception); diff --git a/src/MEDLoader/MEDFileFieldOverView.cxx b/src/MEDLoader/MEDFileFieldOverView.cxx index ee1c95285..e0c38c899 100644 --- a/src/MEDLoader/MEDFileFieldOverView.cxx +++ b/src/MEDLoader/MEDFileFieldOverView.cxx @@ -442,7 +442,7 @@ void MEDUMeshMultiLev::buildVTUArrays(DataArrayDouble *& coords, DataArrayByte * int curNbCells(cur->getNumberOfCells()); szBCE+=curNbCells; if((*it)->getCellModelEnum()!=INTERP_KERNEL::NORM_POLYHED) - szD=(*it)->getNodalConnectivity()->getNumberOfTuples()+curNbCells; + szD+=(*it)->getNodalConnectivity()->getNumberOfTuples()+curNbCells; else { isPolyh=true; diff --git a/src/MEDLoader/Swig/MEDLoaderCommon.i b/src/MEDLoader/Swig/MEDLoaderCommon.i index 62f72f9b3..bdec8bc89 100644 --- a/src/MEDLoader/Swig/MEDLoaderCommon.i +++ b/src/MEDLoader/Swig/MEDLoaderCommon.i @@ -1176,7 +1176,7 @@ namespace ParaMEDMEM void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception); void loadArrays() throw(INTERP_KERNEL::Exception); void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception); - void releaseArrays() throw(INTERP_KERNEL::Exception); + void unloadArrays() throw(INTERP_KERNEL::Exception); int getDimension() const throw(INTERP_KERNEL::Exception); int getIteration() const throw(INTERP_KERNEL::Exception); int getOrder() const throw(INTERP_KERNEL::Exception); @@ -1592,7 +1592,7 @@ namespace ParaMEDMEM void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception); void loadArrays() throw(INTERP_KERNEL::Exception); void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception); - void releaseArrays() throw(INTERP_KERNEL::Exception); + void unloadArrays() throw(INTERP_KERNEL::Exception); // virtual MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const throw(INTERP_KERNEL::Exception); MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception); @@ -2167,7 +2167,7 @@ namespace ParaMEDMEM MEDFileFields *shallowCpy() const throw(INTERP_KERNEL::Exception); void loadArrays() throw(INTERP_KERNEL::Exception); void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception); - void releaseArrays() throw(INTERP_KERNEL::Exception); + void unloadArrays() 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); diff --git a/src/MEDLoader/Swig/MEDLoaderTest3.py b/src/MEDLoader/Swig/MEDLoaderTest3.py index 4769c1bee..9c1b00b2d 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest3.py +++ b/src/MEDLoader/Swig/MEDLoaderTest3.py @@ -2928,7 +2928,7 @@ class MEDLoaderTest(unittest.TestCase): self.assertTrue(not ff0.getUndergroundDataArray().isEqualWithoutConsideringStr(arr,1e-14)) heap_memory_ref=ff0.getHeapMemorySize() self.assertTrue(heap_memory_ref>=1000 and heap_memory_ref<=1100) - ff0.releaseArrays() + ff0.unloadArrays() hmd=ff0.getHeapMemorySize()-heap_memory_ref self.assertEqual(hmd,-800) # -50*8*2 ff0.loadArrays() ##