From 73aef066a1fdbee1e3dfb9086c2aa1ee53927151 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Thu, 16 Oct 2014 17:58:59 +0200 Subject: [PATCH] Going to multi discretizations per geo type management in the MEDReader. --- src/MEDLoader/MEDFileField.cxx | 61 +++++++++ src/MEDLoader/MEDFileField.hxx | 6 + src/MEDLoader/Swig/MEDLoaderCommon.i | 2 + src/MEDLoader/Swig/MEDLoaderTest4.py | 198 ++++++++++++++++++++++----- 4 files changed, 234 insertions(+), 33 deletions(-) diff --git a/src/MEDLoader/MEDFileField.cxx b/src/MEDLoader/MEDFileField.cxx index 4c082e21f..14f49546b 100644 --- a/src/MEDLoader/MEDFileField.cxx +++ b/src/MEDLoader/MEDFileField.cxx @@ -1337,6 +1337,18 @@ int MEDFileFieldPerMeshPerType::getNumberOfComponents() const return _father->getNumberOfComponents(); } +bool MEDFileFieldPerMeshPerType::presenceOfMultiDiscPerGeoType() const +{ + std::size_t nb(0); + for(std::vector< MEDCouplingAutoRefCountObjectPtr >::const_iterator it=_field_pm_pt_pd.begin();it!=_field_pm_pt_pd.end();it++) + { + const MEDFileFieldPerMeshPerTypePerDisc *fmtd(*it); + if(fmtd) + nb++; + } + return nb>1; +} + DataArray *MEDFileFieldPerMeshPerType::getOrCreateAndGetArray() { return _father->getOrCreateAndGetArray(); @@ -1761,6 +1773,19 @@ int MEDFileFieldPerMesh::getNumberOfComponents() const return _father->getNumberOfComponents(); } +bool MEDFileFieldPerMesh::presenceOfMultiDiscPerGeoType() const +{ + for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerType > >::const_iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++) + { + const MEDFileFieldPerMeshPerType *fpmt(*it); + if(!fpmt) + continue; + if(fpmt->presenceOfMultiDiscPerGeoType()) + return true; + } + return false; +} + DataArray *MEDFileFieldPerMesh::getOrCreateAndGetArray() { if(!_father) @@ -4501,6 +4526,19 @@ std::vector& MEDFileAnyTypeField1TSWithoutSDA::getInfo() return arr->getInfoOnComponents(); } +bool MEDFileAnyTypeField1TSWithoutSDA::presenceOfMultiDiscPerGeoType() const +{ + for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh > >::const_iterator it=_field_per_mesh.begin();it!=_field_per_mesh.end();it++) + { + const MEDFileFieldPerMesh *fpm(*it); + if(!fpm) + continue; + if(fpm->presenceOfMultiDiscPerGeoType()) + return true; + } + return false; +} + /*! * Returns a new MEDCouplingFieldDouble of given type lying on a given support. * \param [in] type - a spatial discretization of the new field. @@ -5864,6 +5902,11 @@ std::vector& MEDFileAnyTypeField1TS::getInfo() return contentNotNullBase()->getInfo(); } +bool MEDFileAnyTypeField1TS::presenceOfMultiDiscPerGeoType() const +{ + return contentNotNullBase()->presenceOfMultiDiscPerGeoType(); +} + MEDFileFieldPerMeshPerTypePerDisc *MEDFileAnyTypeField1TS::getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) { return contentNotNullBase()->getLeafGivenMeshAndTypeAndLocId(mName,typ,locId); @@ -6903,6 +6946,19 @@ MEDFileAnyTypeFieldMultiTSWithoutSDA *MEDFileAnyTypeFieldMultiTSWithoutSDA::part return buildFromTimeStepIds(ids->begin(),ids->end()); } +bool MEDFileAnyTypeFieldMultiTSWithoutSDA::presenceOfMultiDiscPerGeoType() const +{ + for(std::vector< MEDCouplingAutoRefCountObjectPtr >::const_iterator it=_time_steps.begin();it!=_time_steps.end();it++) + { + const MEDFileAnyTypeField1TSWithoutSDA *cur(*it); + if(!cur) + continue; + if(cur->presenceOfMultiDiscPerGeoType()) + return true; + } + return false; +} + const std::vector& MEDFileAnyTypeFieldMultiTSWithoutSDA::getInfo() const { return _infos; @@ -8160,6 +8216,11 @@ const std::vector& MEDFileAnyTypeFieldMultiTS::getInfo() const return contentNotNullBase()->getInfo(); } +bool MEDFileAnyTypeFieldMultiTS::presenceOfMultiDiscPerGeoType() const +{ + return contentNotNullBase()->presenceOfMultiDiscPerGeoType(); +} + void MEDFileAnyTypeFieldMultiTS::setInfo(const std::vector& info) { return contentNotNullBase()->setInfo(info); diff --git a/src/MEDLoader/MEDFileField.hxx b/src/MEDLoader/MEDFileField.hxx index 9d8f18e13..e58e423d0 100644 --- a/src/MEDLoader/MEDFileField.hxx +++ b/src/MEDLoader/MEDFileField.hxx @@ -202,6 +202,7 @@ namespace ParaMEDMEM void getSizes(int& globalSz, int& nbOfEntries) const; INTERP_KERNEL::NormalizedCellType getGeoType() const; int getNumberOfComponents() const; + bool presenceOfMultiDiscPerGeoType() const; DataArray *getOrCreateAndGetArray(); const DataArray *getOrCreateAndGetArray() const; const std::vector& getInfo() const; @@ -260,6 +261,7 @@ namespace ParaMEDMEM int getMeshOrder() const { return _mesh_order; } std::string getMeshName() const { return _mesh_name; } int getNumberOfComponents() const; + bool presenceOfMultiDiscPerGeoType() const; DataArray *getOrCreateAndGetArray(); const DataArray *getOrCreateAndGetArray() const; const std::vector& getInfo() const; @@ -494,6 +496,7 @@ namespace ParaMEDMEM MEDLOADER_EXPORT int getNumberOfComponents() const; MEDLOADER_EXPORT const std::vector& getInfo() const; MEDLOADER_EXPORT std::vector& getInfo(); + MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const; MEDLOADER_EXPORT void setInfo(const std::vector& infos); MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; MEDLOADER_EXPORT std::vector getDirectChildrenWithNull() const; @@ -659,6 +662,7 @@ namespace ParaMEDMEM MEDLOADER_EXPORT void setInfo(const std::vector& infos); MEDLOADER_EXPORT const std::vector& getInfo() const; MEDLOADER_EXPORT std::vector& getInfo(); + MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const; MEDLOADER_EXPORT std::vector getTypesOfFieldAvailable() const; MEDLOADER_EXPORT std::vector< std::vector > > getFieldSplitedByType(const std::string& mname, std::vector& types, std::vector< std::vector >& typesF, std::vector< std::vector >& pfls, std::vector< std::vector >& locs) const; @@ -801,6 +805,7 @@ namespace ParaMEDMEM MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const = 0; MEDLOADER_EXPORT virtual void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const = 0; MEDLOADER_EXPORT const std::vector& getInfo() const; + MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const; MEDLOADER_EXPORT void setInfo(const std::vector& info); MEDLOADER_EXPORT int getTimeStepPos(int iteration, int order) const; MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA& getTimeStepEntry(int iteration, int order) const; @@ -961,6 +966,7 @@ namespace ParaMEDMEM MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSIterator *iterator(); MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair >& modifTab); MEDLOADER_EXPORT const std::vector& getInfo() const; + MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const; MEDLOADER_EXPORT void setInfo(const std::vector& info); MEDLOADER_EXPORT int getNumberOfComponents() const; MEDLOADER_EXPORT int getNonEmptyLevels(int iteration, int order, const std::string& mname, std::vector& levs) const; diff --git a/src/MEDLoader/Swig/MEDLoaderCommon.i b/src/MEDLoader/Swig/MEDLoaderCommon.i index 2165e2b49..a9bf3b350 100644 --- a/src/MEDLoader/Swig/MEDLoaderCommon.i +++ b/src/MEDLoader/Swig/MEDLoaderCommon.i @@ -1278,6 +1278,7 @@ namespace ParaMEDMEM bool isDealingTS(int iteration, int order) const throw(INTERP_KERNEL::Exception); void setInfo(const std::vector& infos) throw(INTERP_KERNEL::Exception); const std::vector& getInfo() const throw(INTERP_KERNEL::Exception); + bool presenceOfMultiDiscPerGeoType() const throw(INTERP_KERNEL::Exception); void setTime(int iteration, int order, double val) throw(INTERP_KERNEL::Exception); virtual MEDFileAnyTypeField1TS *shallowCpy() const throw(INTERP_KERNEL::Exception); MEDFileAnyTypeField1TS *deepCpy() const throw(INTERP_KERNEL::Exception); @@ -1672,6 +1673,7 @@ namespace ParaMEDMEM std::string getMeshName() const throw(INTERP_KERNEL::Exception); void setMeshName(const std::string& newMeshName) throw(INTERP_KERNEL::Exception); const std::vector& getInfo() const throw(INTERP_KERNEL::Exception); + bool presenceOfMultiDiscPerGeoType() const throw(INTERP_KERNEL::Exception); int getNumberOfComponents() const throw(INTERP_KERNEL::Exception); int getNumberOfTS() const throw(INTERP_KERNEL::Exception); void eraseEmptyTS() throw(INTERP_KERNEL::Exception); diff --git a/src/MEDLoader/Swig/MEDLoaderTest4.py b/src/MEDLoader/Swig/MEDLoaderTest4.py index 2425b10f6..1cad4bfdb 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest4.py +++ b/src/MEDLoader/Swig/MEDLoaderTest4.py @@ -158,7 +158,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -369,7 +373,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -531,7 +539,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -782,7 +794,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -910,7 +926,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -1072,7 +1092,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -1277,7 +1301,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -1472,7 +1500,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + #for itmp in tmp: + # self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + # pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -1616,7 +1648,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + #for itmp in tmp: + # self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + # pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -1745,7 +1781,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -1844,7 +1884,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + #for itmp in tmp: + # self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + # pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -1935,7 +1979,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + #for itmp in tmp: + # self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + # pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -2048,7 +2096,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -2200,7 +2252,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -2358,7 +2414,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -2546,7 +2606,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -2618,7 +2682,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -2730,7 +2798,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -2795,7 +2867,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -2896,7 +2972,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -3076,7 +3156,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -3273,7 +3357,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -3381,7 +3469,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -3482,7 +3574,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -3586,7 +3682,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -3796,7 +3896,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -3911,7 +4015,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -4049,7 +4157,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -4183,7 +4295,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -4287,7 +4403,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -4393,7 +4513,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -4489,7 +4613,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass @@ -4589,7 +4717,11 @@ class MEDLoaderTest4(unittest.TestCase): for fields in fields_per_mesh: allFMTSLeavesToDisplay2=[] for fmts in fields: - allFMTSLeavesToDisplay2+=fmts.splitDiscretizations() + tmp=fmts.splitDiscretizations() + for itmp in tmp: + self.assertTrue(not itmp.presenceOfMultiDiscPerGeoType()) + pass + allFMTSLeavesToDisplay2+=tmp pass allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2) pass -- 2.39.2