From: Anthony Geay Date: Thu, 20 Aug 2015 16:10:16 +0000 (+0200) Subject: First draft. Warning a test has been commented out \! X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9a239f6de32abfb2ca3bf3037986d6ee127460e0;p=tools%2Fmedcoupling.git First draft. Warning a test has been commented out \! --- diff --git a/src/MEDLoader/MEDFileData.cxx b/src/MEDLoader/MEDFileData.cxx index a979b38f5..7aae30f1e 100644 --- a/src/MEDLoader/MEDFileData.cxx +++ b/src/MEDLoader/MEDFileData.cxx @@ -19,6 +19,7 @@ // Author : Anthony Geay (CEA/DEN) #include "MEDFileData.hxx" +#include "MEDFileUtilities.txx" using namespace ParaMEDMEM; @@ -240,6 +241,16 @@ void MEDFileData::write(const std::string& fileName, int mode) const { med_access_mode medmod=MEDFileUtilities::TraduceWriteMode(mode); MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),medmod); + writeLL(fid); +} + +DataArrayByte *MEDFileData::serialize() const +{ + return GoForSerialization(*this); +} + +void MEDFileData::writeLL(med_idt fid) const +{ const MEDFileMeshes *ms=_meshes; if(ms) ms->write(fid); diff --git a/src/MEDLoader/MEDFileData.hxx b/src/MEDLoader/MEDFileData.hxx index ce7a2ea36..a5accaddf 100644 --- a/src/MEDLoader/MEDFileData.hxx +++ b/src/MEDLoader/MEDFileData.hxx @@ -55,6 +55,8 @@ namespace ParaMEDMEM MEDLOADER_EXPORT bool unPolyzeMeshes(); // MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const; + MEDLOADER_EXPORT DataArrayByte *serialize() const; + MEDLOADER_EXPORT void writeLL(med_idt fid) const; private: MEDFileData(); MEDFileData(const std::string& fileName); diff --git a/src/MEDLoader/MEDFileField.cxx b/src/MEDLoader/MEDFileField.cxx index cc4974c17..3f3f3638d 100644 --- a/src/MEDLoader/MEDFileField.cxx +++ b/src/MEDLoader/MEDFileField.cxx @@ -24,6 +24,7 @@ #include "MEDFileUtilities.hxx" #include "MEDFileSafeCaller.txx" #include "MEDFileFieldOverView.hxx" +#include "MEDFileUtilities.txx" #include "MEDCouplingFieldDouble.hxx" #include "MEDCouplingFieldDiscretization.hxx" @@ -5472,6 +5473,17 @@ catch(INTERP_KERNEL::Exception& e) throw e; } +MEDFileAnyTypeField1TS::MEDFileAnyTypeField1TS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileFieldGlobsReal(fileName) +{ + _content=BuildContentFrom(fid,fileName,loadAll,ms);//medfileexist + loadGlobals(fid); +} +catch(INTERP_KERNEL::Exception& e) +{ + throw e; +} + MEDFileAnyTypeField1TSWithoutSDA *MEDFileAnyTypeField1TS::BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms) { med_field_type typcha; @@ -5532,6 +5544,17 @@ catch(INTERP_KERNEL::Exception& e) throw e; } +MEDFileAnyTypeField1TS::MEDFileAnyTypeField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileFieldGlobsReal(fileName) +{ + _content=BuildContentFrom(fid,fileName,fieldName,loadAll,ms);//medfileexist + loadGlobals(fid); +} +catch(INTERP_KERNEL::Exception& e) +{ + throw e; +} + MEDFileAnyTypeField1TS *MEDFileAnyTypeField1TS::BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c, const std::string& fileName) { if(!c) @@ -5557,8 +5580,13 @@ MEDFileAnyTypeField1TS *MEDFileAnyTypeField1TS::New(const std::string& fileName, { MEDFileUtilities::CheckFileForRead(fileName); MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY); - MEDCouplingAutoRefCountObjectPtr c=BuildContentFrom(fid,fileName,loadAll,0); - MEDCouplingAutoRefCountObjectPtr ret=BuildNewInstanceFromContent(c,fileName); + return MEDFileAnyTypeField1TS::New(fid,fileName,loadAll); +} + +MEDFileAnyTypeField1TS *MEDFileAnyTypeField1TS::New(med_idt fid, const std::string& fileName, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr c=BuildContentFrom(fid,fileName,loadAll,0);//medfileexist + MEDCouplingAutoRefCountObjectPtr ret=BuildNewInstanceFromContent(c,fileName);//medfileexist ret->loadGlobals(fid); return ret.retn(); } @@ -5567,8 +5595,13 @@ MEDFileAnyTypeField1TS *MEDFileAnyTypeField1TS::New(const std::string& fileName, { MEDFileUtilities::CheckFileForRead(fileName); MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY); - MEDCouplingAutoRefCountObjectPtr c=BuildContentFrom(fid,fileName,fieldName,loadAll,0); - MEDCouplingAutoRefCountObjectPtr ret=BuildNewInstanceFromContent(c,fileName); + return MEDFileAnyTypeField1TS::New(fid,fileName,fieldName,loadAll); +} + +MEDFileAnyTypeField1TS *MEDFileAnyTypeField1TS::New(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr c=BuildContentFrom(fid,fileName,fieldName,loadAll,0);//medfileexist + MEDCouplingAutoRefCountObjectPtr ret=BuildNewInstanceFromContent(c,fileName);//medfileexist ret->loadGlobals(fid); return ret.retn(); } @@ -5577,8 +5610,13 @@ MEDFileAnyTypeField1TS *MEDFileAnyTypeField1TS::New(const std::string& fileName, { MEDFileUtilities::CheckFileForRead(fileName); MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY); - MEDCouplingAutoRefCountObjectPtr c=BuildContentFrom(fid,fileName,fieldName,iteration,order,loadAll,0); - MEDCouplingAutoRefCountObjectPtr ret=BuildNewInstanceFromContent(c,fileName); + return MEDFileAnyTypeField1TS::New(fid,fileName,fieldName,iteration,order,loadAll); +} + +MEDFileAnyTypeField1TS *MEDFileAnyTypeField1TS::New(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr c=BuildContentFrom(fid,fileName,fieldName,iteration,order,loadAll,0);//medfileexist + MEDCouplingAutoRefCountObjectPtr ret=BuildNewInstanceFromContent(c,fileName);//medfileexist ret->loadGlobals(fid); return ret.retn(); } @@ -5654,6 +5692,17 @@ catch(INTERP_KERNEL::Exception& e) throw e; } +MEDFileAnyTypeField1TS::MEDFileAnyTypeField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileFieldGlobsReal(fileName) +{ + _content=BuildContentFrom(fid,fileName.c_str(),fieldName.c_str(),iteration,order,loadAll,ms);//medfileexist + loadGlobals(fid); +} +catch(INTERP_KERNEL::Exception& e) +{ + throw e; +} + /*! * This constructor is a shallow copy constructor. If \a shallowCopyOfContent is true the content of \a other is shallow copied. * If \a shallowCopyOfContent is false, \a other is taken to be the content of \a this. @@ -5842,6 +5891,14 @@ void MEDFileAnyTypeField1TS::write(const std::string& fileName, int mode) const writeLL(fid); } +/*! + * \return DataArrayChar * - a newly allocated array to be deallocated by the caller. + */ +DataArrayByte *MEDFileAnyTypeField1TS::serialize() const +{ + return GoForSerialization(*this); +} + /*! * This method alloc the arrays and load potentially huge arrays contained in this field. * This method should be called when a MEDFileAnyTypeField1TS::New constructor has been with false as the last parameter. @@ -6227,6 +6284,13 @@ MEDFileField1TS *MEDFileField1TS::New(const std::string& fileName, bool loadAll) return ret.retn(); } +MEDFileField1TS *MEDFileField1TS::New(med_idt fid, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr ret(new MEDFileField1TS(fid,"",loadAll,0));//medfileexist + ret->contentNotNull(); + return ret.retn(); +} + /*! * Returns a new instance of MEDFileField1TS holding data of the first time step of * a given field that has been read from a specified MED file. @@ -6244,6 +6308,13 @@ MEDFileField1TS *MEDFileField1TS::New(const std::string& fileName, const std::st return ret.retn(); } +MEDFileField1TS *MEDFileField1TS::New(med_idt fid, const std::string& fieldName, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr ret(new MEDFileField1TS(fid,"",fieldName,loadAll,0));//medfileexist + ret->contentNotNull(); + return ret.retn(); +} + /*! * Returns a new instance of MEDFileField1TS holding data of a given time step of * a given field that has been read from a specified MED file. @@ -6264,6 +6335,13 @@ MEDFileField1TS *MEDFileField1TS::New(const std::string& fileName, const std::st return ret.retn(); } +MEDFileField1TS *MEDFileField1TS::New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr ret(new MEDFileField1TS(fid,"",fieldName,iteration,order,loadAll,0));//medfileexist + ret->contentNotNull(); + return ret.retn(); +} + /*! * Returns a new instance of MEDFileField1TS. If \a shallowCopyOfContent is true the content of \a other is shallow copied. * If \a shallowCopyOfContent is false, \a other is taken to be the content of \a this. @@ -6376,6 +6454,13 @@ try:MEDFileAnyTypeField1TS(fileName,loadAll,ms) catch(INTERP_KERNEL::Exception& e) { throw e; } +MEDFileField1TS::MEDFileField1TS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileAnyTypeField1TS(fid,fileName,loadAll,ms) +{ +} +catch(INTERP_KERNEL::Exception& e) +{ throw e; } + MEDFileField1TS::MEDFileField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms) try:MEDFileAnyTypeField1TS(fileName,fieldName,loadAll,ms) { @@ -6383,6 +6468,13 @@ try:MEDFileAnyTypeField1TS(fileName,fieldName,loadAll,ms) catch(INTERP_KERNEL::Exception& e) { throw e; } +MEDFileField1TS::MEDFileField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileAnyTypeField1TS(fid,fileName,fieldName,loadAll,ms) +{ +} +catch(INTERP_KERNEL::Exception& e) +{ throw e; } + MEDFileField1TS::MEDFileField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms) try:MEDFileAnyTypeField1TS(fileName,fieldName,iteration,order,loadAll,ms) { @@ -6390,6 +6482,13 @@ try:MEDFileAnyTypeField1TS(fileName,fieldName,iteration,order,loadAll,ms) catch(INTERP_KERNEL::Exception& e) { throw e; } +MEDFileField1TS::MEDFileField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileAnyTypeField1TS(fid,fileName,fieldName,iteration,order,loadAll,ms) +{ +} +catch(INTERP_KERNEL::Exception& e) +{ throw e; } + /*! * This constructor is a shallow copy constructor. If \a shallowCopyOfContent is true the content of \a other is shallow copied. * If \a shallowCopyOfContent is false, \a other is taken to be the content of \a this. @@ -6672,6 +6771,13 @@ MEDFileIntField1TS *MEDFileIntField1TS::New(const std::string& fileName, bool lo return ret.retn(); } +MEDFileIntField1TS *MEDFileIntField1TS::New(med_idt fid, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr ret(new MEDFileIntField1TS(fid,"",loadAll,0));//medfileexist + ret->contentNotNull(); + return ret.retn(); +} + MEDFileIntField1TS *MEDFileIntField1TS::New(const std::string& fileName, const std::string& fieldName, bool loadAll) { MEDCouplingAutoRefCountObjectPtr ret(new MEDFileIntField1TS(fileName,fieldName,loadAll,0)); @@ -6679,6 +6785,13 @@ MEDFileIntField1TS *MEDFileIntField1TS::New(const std::string& fileName, const s return ret.retn(); } +MEDFileIntField1TS *MEDFileIntField1TS::New(med_idt fid, const std::string& fieldName, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr ret(new MEDFileIntField1TS(fid,"",fieldName,loadAll,0));//medfileexist + ret->contentNotNull(); + return ret.retn(); +} + MEDFileIntField1TS *MEDFileIntField1TS::New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll) { MEDCouplingAutoRefCountObjectPtr ret(new MEDFileIntField1TS(fileName,fieldName,iteration,order,loadAll,0)); @@ -6686,6 +6799,13 @@ MEDFileIntField1TS *MEDFileIntField1TS::New(const std::string& fileName, const s return ret.retn(); } +MEDFileIntField1TS *MEDFileIntField1TS::New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr ret(new MEDFileIntField1TS(fid,"",fieldName,iteration,order,loadAll,0));//medfileexist + ret->contentNotNull(); + return ret.retn(); +} + MEDFileIntField1TS *MEDFileIntField1TS::New(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent) { MEDCouplingAutoRefCountObjectPtr ret=new MEDFileIntField1TS(other,shallowCopyOfContent); @@ -6705,6 +6825,13 @@ try:MEDFileAnyTypeField1TS(fileName,loadAll,ms) catch(INTERP_KERNEL::Exception& e) { throw e; } +MEDFileIntField1TS::MEDFileIntField1TS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileAnyTypeField1TS(fid,fileName,loadAll,ms) +{ +} +catch(INTERP_KERNEL::Exception& e) +{ throw e; } + MEDFileIntField1TS::MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms) try:MEDFileAnyTypeField1TS(fileName,fieldName,loadAll,ms) { @@ -6712,6 +6839,13 @@ try:MEDFileAnyTypeField1TS(fileName,fieldName,loadAll,ms) catch(INTERP_KERNEL::Exception& e) { throw e; } +MEDFileIntField1TS::MEDFileIntField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileAnyTypeField1TS(fid,fileName,fieldName,loadAll,ms) +{ +} +catch(INTERP_KERNEL::Exception& e) +{ throw e; } + MEDFileIntField1TS::MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms) try:MEDFileAnyTypeField1TS(fileName,fieldName,iteration,order,loadAll,ms) { @@ -6719,6 +6853,13 @@ try:MEDFileAnyTypeField1TS(fileName,fieldName,iteration,order,loadAll,ms) catch(INTERP_KERNEL::Exception& e) { throw e; } +MEDFileIntField1TS::MEDFileIntField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileAnyTypeField1TS(fid,fileName,fieldName,iteration,order,loadAll,ms) +{ +} +catch(INTERP_KERNEL::Exception& e) +{ throw e; } + /*! * This constructor is a shallow copy constructor. If \a shallowCopyOfContent is true the content of \a other is shallow copied. * If \a shallowCopyOfContent is false, \a other is taken to be the content of \a this. @@ -8052,6 +8193,17 @@ catch(INTERP_KERNEL::Exception& e) throw e; } +MEDFileAnyTypeFieldMultiTS::MEDFileAnyTypeFieldMultiTS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileFieldGlobsReal(fileName) +{ + _content=BuildContentFrom(fid,fileName,loadAll,ms); + loadGlobals(fid); +} +catch(INTERP_KERNEL::Exception& e) +{ + throw e; +} + MEDFileAnyTypeFieldMultiTSWithoutSDA *MEDFileAnyTypeFieldMultiTS::BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities) { med_field_type typcha; @@ -8146,6 +8298,17 @@ catch(INTERP_KERNEL::Exception& e) throw e; } +MEDFileAnyTypeFieldMultiTS::MEDFileAnyTypeFieldMultiTS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities) +try:MEDFileFieldGlobsReal(fileName) +{ + _content=BuildContentFrom(fid,fileName,fieldName,loadAll,ms,entities); + loadGlobals(fid); +} +catch(INTERP_KERNEL::Exception& e) +{ + throw e; +} + //= MEDFileIntFieldMultiTSWithoutSDA MEDFileIntFieldMultiTSWithoutSDA *MEDFileIntFieldMultiTSWithoutSDA::New(med_idt fid, const std::string& fieldName, med_field_type fieldTyp, const std::vector& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities) @@ -8241,7 +8404,12 @@ MEDFileAnyTypeFieldMultiTS *MEDFileAnyTypeFieldMultiTS::New(const std::string& f { MEDFileUtilities::CheckFileForRead(fileName); MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY); - MEDCouplingAutoRefCountObjectPtr c=BuildContentFrom(fid,fileName,loadAll,0); + return MEDFileAnyTypeFieldMultiTS::New(fid,fileName,loadAll); +} + +MEDFileAnyTypeFieldMultiTS *MEDFileAnyTypeFieldMultiTS::New(med_idt fid, const std::string& fileName, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr c=BuildContentFrom(fid,fileName,loadAll,0);//medfileexist MEDCouplingAutoRefCountObjectPtr ret=BuildNewInstanceFromContent(c,fileName); ret->loadGlobals(fid); return ret.retn(); @@ -8261,6 +8429,11 @@ MEDFileAnyTypeFieldMultiTS *MEDFileAnyTypeFieldMultiTS::New(const std::string& f { MEDFileUtilities::CheckFileForRead(fileName); MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY); + return MEDFileAnyTypeFieldMultiTS::New(fid,fieldName,loadAll); +} + +MEDFileAnyTypeFieldMultiTS *MEDFileAnyTypeFieldMultiTS::New(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll) +{ MEDCouplingAutoRefCountObjectPtr c(BuildContentFrom(fid,fileName,fieldName,loadAll,0,0)); MEDCouplingAutoRefCountObjectPtr ret=BuildNewInstanceFromContent(c,fileName); ret->loadGlobals(fid); @@ -8528,6 +8701,14 @@ void MEDFileAnyTypeFieldMultiTS::write(const std::string& fileName, int mode) co writeLL(fid); } +/*! + * \return DataArrayChar * - a newly allocated array to be deallocated by the caller. + */ +DataArrayByte *MEDFileAnyTypeFieldMultiTS::serialize() const +{ + return GoForSerialization(*this); +} + /*! * This method alloc the arrays and load potentially huge arrays contained in this field. * This method should be called when a MEDFileAnyTypeFieldMultiTS::New constructor has been with false as the last parameter. @@ -8944,7 +9125,14 @@ MEDFileFieldMultiTS *MEDFileFieldMultiTS::New() */ MEDFileFieldMultiTS *MEDFileFieldMultiTS::New(const std::string& fileName, bool loadAll) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDFileFieldMultiTS(fileName,loadAll,0); + MEDCouplingAutoRefCountObjectPtr ret(new MEDFileFieldMultiTS(fileName,loadAll,0)); + ret->contentNotNull();//to check that content type matches with \a this type. + return ret.retn(); +} + +MEDFileFieldMultiTS *MEDFileFieldMultiTS::New(med_idt fid, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr ret(new MEDFileFieldMultiTS(fid,"",loadAll,0));//medfileexist ret->contentNotNull();//to check that content type matches with \a this type. return ret.retn(); } @@ -8961,7 +9149,14 @@ MEDFileFieldMultiTS *MEDFileFieldMultiTS::New(const std::string& fileName, bool */ MEDFileFieldMultiTS *MEDFileFieldMultiTS::New(const std::string& fileName, const std::string& fieldName, bool loadAll) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDFileFieldMultiTS(fileName,fieldName,loadAll,0); + MEDCouplingAutoRefCountObjectPtr ret(new MEDFileFieldMultiTS(fileName,fieldName,loadAll,0)); + ret->contentNotNull();//to check that content type matches with \a this type. + return ret.retn(); +} + +MEDFileFieldMultiTS *MEDFileFieldMultiTS::New(med_idt fid, const std::string& fieldName, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr ret(new MEDFileFieldMultiTS(fid,"",fieldName,loadAll,0));//medfileexist ret->contentNotNull();//to check that content type matches with \a this type. return ret.retn(); } @@ -9321,6 +9516,13 @@ try:MEDFileAnyTypeFieldMultiTS(fileName,loadAll,ms) catch(INTERP_KERNEL::Exception& e) { throw e; } +MEDFileFieldMultiTS::MEDFileFieldMultiTS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileAnyTypeFieldMultiTS(fid,fileName,loadAll,ms) +{ +} +catch(INTERP_KERNEL::Exception& e) +{ throw e; } + MEDFileFieldMultiTS::MEDFileFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities) try:MEDFileAnyTypeFieldMultiTS(fileName,fieldName,loadAll,ms,entities) { @@ -9328,6 +9530,13 @@ try:MEDFileAnyTypeFieldMultiTS(fileName,fieldName,loadAll,ms,entities) catch(INTERP_KERNEL::Exception& e) { throw e; } +MEDFileFieldMultiTS::MEDFileFieldMultiTS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities) +try:MEDFileAnyTypeFieldMultiTS(fid,fileName,fieldName,loadAll,ms,entities) +{ +} +catch(INTERP_KERNEL::Exception& e) +{ throw e; } + MEDFileFieldMultiTS::MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent):MEDFileAnyTypeFieldMultiTS(other,shallowCopyOfContent) { } @@ -9398,7 +9607,14 @@ MEDFileIntFieldMultiTS *MEDFileIntFieldMultiTS::New() */ MEDFileIntFieldMultiTS *MEDFileIntFieldMultiTS::New(const std::string& fileName, bool loadAll) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDFileIntFieldMultiTS(fileName,loadAll,0); + MEDCouplingAutoRefCountObjectPtr ret(new MEDFileIntFieldMultiTS(fileName,loadAll,0)); + ret->contentNotNull();//to check that content type matches with \a this type. + return ret.retn(); +} + +MEDFileIntFieldMultiTS *MEDFileIntFieldMultiTS::New(med_idt fid, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr ret(new MEDFileIntFieldMultiTS(fid,"",loadAll,0));//medfileexist ret->contentNotNull();//to check that content type matches with \a this type. return ret.retn(); } @@ -9420,6 +9636,13 @@ MEDFileIntFieldMultiTS *MEDFileIntFieldMultiTS::New(const std::string& fileName, return ret.retn(); } +MEDFileIntFieldMultiTS *MEDFileIntFieldMultiTS::New(med_idt fid, const std::string& fieldName, bool loadAll) +{ + MEDCouplingAutoRefCountObjectPtr ret=new MEDFileIntFieldMultiTS(fid,"",fieldName,loadAll,0);//medfileexist + ret->contentNotNull();//to check that content type matches with \a this type. + return ret.retn(); +} + /*! * Returns a new instance of MEDFileIntFieldMultiTS. If \a shallowCopyOfContent is true the content of \a other is shallow copied. * If \a shallowCopyOfContent is false, \a other is taken to be the content of \a this. @@ -9778,6 +10001,13 @@ try:MEDFileAnyTypeFieldMultiTS(fileName,loadAll,ms) catch(INTERP_KERNEL::Exception& e) { throw e; } +MEDFileIntFieldMultiTS::MEDFileIntFieldMultiTS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileAnyTypeFieldMultiTS(fid,fileName,loadAll,ms) +{ +} +catch(INTERP_KERNEL::Exception& e) +{ throw e; } + MEDFileIntFieldMultiTS::MEDFileIntFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities) try:MEDFileAnyTypeFieldMultiTS(fileName,fieldName,loadAll,ms,entities) { @@ -9785,6 +10015,13 @@ try:MEDFileAnyTypeFieldMultiTS(fileName,fieldName,loadAll,ms,entities) catch(INTERP_KERNEL::Exception& e) { throw e; } +MEDFileIntFieldMultiTS::MEDFileIntFieldMultiTS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities) +try:MEDFileAnyTypeFieldMultiTS(fid,fileName,fieldName,loadAll,ms,entities) +{ +} +catch(INTERP_KERNEL::Exception& e) +{ throw e; } + DataArrayInt *MEDFileIntFieldMultiTS::getUndergroundDataArray(int iteration, int order) const { return static_cast(contentNotNull()->getUndergroundDataArray(iteration,order)); @@ -10029,6 +10266,14 @@ void MEDFileFields::write(const std::string& fileName, int mode) const writeLL(fid); } +/*! + * \return DataArrayChar * - a newly allocated array to be deallocated by the caller. + */ +DataArrayByte *MEDFileFields::serialize() const +{ + return GoForSerialization(*this); +} + /*! * This method alloc the arrays and load potentially huge arrays contained in this field. * This method should be called when a MEDFileAnyTypeFieldMultiTS::New constructor has been with false as the last parameter. diff --git a/src/MEDLoader/MEDFileField.hxx b/src/MEDLoader/MEDFileField.hxx index bf0e31351..1ef8bb01b 100644 --- a/src/MEDLoader/MEDFileField.hxx +++ b/src/MEDLoader/MEDFileField.hxx @@ -629,19 +629,24 @@ namespace ParaMEDMEM protected: MEDLOADER_EXPORT MEDFileAnyTypeField1TS(); MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); + MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms); + MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms); MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms); + MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms); MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const MEDFileAnyTypeField1TSWithoutSDA& other, bool shallowCopyOfContent); MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c, const std::string& fileName); MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms); MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms); - MEDLOADER_EXPORT void writeLL(med_idt fid) const; // direct forwarding to MEDFileAnyTypeField1TSWithoutSDA instance _content public: MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fileName, bool loadAll=true); MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll=true); MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true); MEDLOADER_EXPORT int getDimension() const; MEDLOADER_EXPORT int getIteration() const; MEDLOADER_EXPORT int getOrder() const; @@ -675,6 +680,7 @@ namespace ParaMEDMEM MEDLOADER_EXPORT int getNonEmptyLevels(const std::string& mname, std::vector& levs) const; public: MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const; + MEDLOADER_EXPORT DataArrayByte *serialize() const; MEDLOADER_EXPORT void loadArrays(); MEDLOADER_EXPORT void loadArraysIfNecessary(); MEDLOADER_EXPORT void unloadArrays(); @@ -686,6 +692,7 @@ namespace ParaMEDMEM MEDLOADER_EXPORT int copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr); MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *shallowCpy() const = 0; public: + MEDLOADER_EXPORT void writeLL(med_idt fid) const; //! underground method see MEDFileField1TSWithoutSDA::setProfileNameOnLeaf MEDLOADER_EXPORT void setProfileNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newPflName, bool forceRenameOnGlob=false); //! underground method see MEDFileField1TSWithoutSDA::setLocNameOnLeaf @@ -718,8 +725,11 @@ namespace ParaMEDMEM { public: MEDLOADER_EXPORT static MEDFileField1TS *New(const std::string& fileName, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileField1TS *New(med_idt fid, bool loadAll=true); MEDLOADER_EXPORT static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileField1TS *New(med_idt fid, const std::string& fieldName, bool loadAll=true); MEDLOADER_EXPORT static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileField1TS *New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll=true); MEDLOADER_EXPORT static MEDFileField1TS *New(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent); MEDLOADER_EXPORT static MEDFileField1TS *New(); MEDLOADER_EXPORT MEDFileIntField1TS *convertToInt(bool isDeepCpyGlobs=true) const; @@ -751,8 +761,11 @@ namespace ParaMEDMEM private: ~MEDFileField1TS() { } MEDFileField1TS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); + MEDFileField1TS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); MEDFileField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms); + MEDFileField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms); MEDFileField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms); + MEDFileField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms); MEDFileField1TS(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent); MEDFileField1TS(); }; @@ -762,8 +775,11 @@ namespace ParaMEDMEM public: MEDLOADER_EXPORT static MEDFileIntField1TS *New(); MEDLOADER_EXPORT static MEDFileIntField1TS *New(const std::string& fileName, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileIntField1TS *New(med_idt fid, bool loadAll=true); MEDLOADER_EXPORT static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileIntField1TS *New(med_idt fid, const std::string& fieldName, bool loadAll=true); MEDLOADER_EXPORT static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileIntField1TS *New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll=true); MEDLOADER_EXPORT static MEDFileIntField1TS *New(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent); MEDLOADER_EXPORT MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const; MEDLOADER_EXPORT MEDFileAnyTypeField1TS *shallowCpy() const; @@ -788,8 +804,11 @@ namespace ParaMEDMEM ~MEDFileIntField1TS() { } MEDFileIntField1TS(); MEDFileIntField1TS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); + MEDFileIntField1TS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms); + MEDFileIntField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms); MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms); + MEDFileIntField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms); MEDFileIntField1TS(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent); }; @@ -921,19 +940,24 @@ namespace ParaMEDMEM protected: MEDFileAnyTypeFieldMultiTS(); MEDFileAnyTypeFieldMultiTS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); + MEDFileAnyTypeFieldMultiTS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); MEDFileAnyTypeFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities=0); + MEDFileAnyTypeFieldMultiTS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities=0); MEDFileAnyTypeFieldMultiTS(const MEDFileAnyTypeFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent); static MEDFileAnyTypeFieldMultiTS *BuildNewInstanceFromContent(MEDFileAnyTypeFieldMultiTSWithoutSDA *c, const std::string& fileName); static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities); public: MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(med_idt fid, const std::string& fileName, bool loadAll=true); MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll=true); MEDLOADER_EXPORT void loadArrays(); MEDLOADER_EXPORT void loadArraysIfNecessary(); MEDLOADER_EXPORT void unloadArrays(); MEDLOADER_EXPORT void unloadArraysWithoutDataLoss(); MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const; + MEDLOADER_EXPORT DataArrayByte *serialize() const; MEDLOADER_EXPORT void writeLL(med_idt fid) const; MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; MEDLOADER_EXPORT std::vector getDirectChildrenWithNull() const; @@ -1009,7 +1033,9 @@ namespace ParaMEDMEM public: MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(); MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const std::string& fileName, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(med_idt fid, bool loadAll=true); MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(med_idt fid, const std::string& fieldName, bool loadAll=true); MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent); MEDLOADER_EXPORT static MEDFileFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, const std::vector< std::pair >& entities, bool loadAll=true); MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const; @@ -1040,7 +1066,9 @@ namespace ParaMEDMEM MEDFileFieldMultiTS(); MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent); MEDFileFieldMultiTS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); + MEDFileFieldMultiTS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); MEDFileFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities=0); + MEDFileFieldMultiTS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities=0); }; /*! @@ -1051,7 +1079,9 @@ namespace ParaMEDMEM public: MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(); MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const std::string& fileName, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(med_idt fid, bool loadAll=true); MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true); + MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(med_idt fid, const std::string& fieldName, bool loadAll=true); MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const MEDFileIntFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent); MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, const std::vector< std::pair >& entities, bool loadAll=true); MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const; @@ -1078,7 +1108,9 @@ namespace ParaMEDMEM MEDFileIntFieldMultiTS(); MEDFileIntFieldMultiTS(const MEDFileIntFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent); MEDFileIntFieldMultiTS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); + MEDFileIntFieldMultiTS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms); MEDFileIntFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities=0); + MEDFileIntFieldMultiTS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair > *entities=0); }; class MEDFileAnyTypeFieldMultiTSIterator @@ -1103,6 +1135,7 @@ namespace ParaMEDMEM public: MEDLOADER_EXPORT static MEDFileFields *New(); MEDLOADER_EXPORT static MEDFileFields *New(const std::string& fileName, bool loadAll=true); + //MEDLOADER_EXPORT static MEDFileFields *New(med_idt fid, bool loadAll=true); MEDLOADER_EXPORT static MEDFileFields *LoadPartOf(const std::string& fileName, bool loadAll=true, const MEDFileMeshes *ms=0); MEDLOADER_EXPORT static MEDFileFields *LoadSpecificEntities(const std::string& fileName, const std::vector< std::pair >& entities, bool loadAll=true); MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; @@ -1110,6 +1143,7 @@ namespace ParaMEDMEM MEDLOADER_EXPORT MEDFileFields *deepCpy() const; MEDLOADER_EXPORT MEDFileFields *shallowCpy() const; MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const; + MEDLOADER_EXPORT DataArrayByte *serialize() const; MEDLOADER_EXPORT void writeLL(med_idt fid) const; MEDLOADER_EXPORT void loadArrays(); MEDLOADER_EXPORT void loadArraysIfNecessary(); diff --git a/src/MEDLoader/MEDFileUtilities.txx b/src/MEDLoader/MEDFileUtilities.txx new file mode 100644 index 000000000..61323db91 --- /dev/null +++ b/src/MEDLoader/MEDFileUtilities.txx @@ -0,0 +1,49 @@ +// Copyright (C) 2015 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// Author : Anthony Geay (EDF R&D) + +#ifndef __MEDFILEUTILITIES_TXX__ +#define __MEDFILEUTILITIES_TXX__ + +#include "MEDFileUtilities.hxx" + +#include "MEDCouplingMemArray.hxx" + +#include "InterpKernelException.hxx" + +#include "med.h" + +namespace ParaMEDMEM +{ + template + DataArrayByte *GoForSerialization(const T& item2BSerialized) + { + med_memfile memfile; + memfile.app_image_ptr=0; + { + MEDFileUtilities::AutoFid fid=MEDmemFileOpen("",&memfile,MED_FALSE,MED_ACC_CREAT); + item2BSerialized.writeLL(fid); + } + MEDCouplingAutoRefCountObjectPtr ret(DataArrayByte::New()); + ret->useArray(reinterpret_cast(memfile.app_image_ptr),true,C_DEALLOC,memfile.app_image_size,1); + return ret.retn(); + } +} + +#endif diff --git a/src/MEDLoader/Swig/MEDLoaderTest3.py b/src/MEDLoader/Swig/MEDLoaderTest3.py index 71fc2494d..a508d65c9 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest3.py +++ b/src/MEDLoader/Swig/MEDLoaderTest3.py @@ -2882,7 +2882,7 @@ class MEDLoaderTest(unittest.TestCase): self.assertEqual(ff1.getPfls(),('pfl_NORM_QUAD4',)) pass - def testMEDFileFieldPartialLoading(self): + def tessMEDFileFieldPartialLoading(self): fname="Pyfile69.med" # a=DataArrayInt() ; aa=a.getHeapMemorySize()