From: Anthony Geay Date: Tue, 25 Apr 2017 08:47:12 +0000 (+0200) Subject: MEDLoaderSplitter in now available to use it X-Git-Tag: V8_4_0a1~74 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ef8b5d74095afed3b66b81449395264cafffa894;p=tools%2Fmedcoupling.git MEDLoaderSplitter in now available to use it --- diff --git a/src/MEDLoader/Swig/CMakeLists.txt b/src/MEDLoader/Swig/CMakeLists.txt index 14d39353a..5377a3db3 100644 --- a/src/MEDLoader/Swig/CMakeLists.txt +++ b/src/MEDLoader/Swig/CMakeLists.txt @@ -73,7 +73,10 @@ INSTALL(FILES MEDLoader.i MEDLoaderTypemaps.i MEDLoaderCommon.i DESTINATION ${ME SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/MEDLoader.py ${MEDCOUPLING_INSTALL_PYTHON}) -INSTALL(FILES MEDLoaderDataForTest.py MEDLoaderTest1.py MEDLoaderTest2.py MEDLoaderTest3.py MEDLoaderTest123.py MEDLoaderTest4.py SauvLoaderTest.py MEDLoaderExamplesTest.py MEDLoaderCouplingTrainingSession.py CaseIO.py CaseReader.py CaseWriter.py VTKReader.py MEDLoaderSplitter.py medutilities.py DESTINATION ${MEDCOUPLING_INSTALL_SCRIPT_SCRIPTS}) +INSTALL(FILES MEDLoaderSplitter.py DESTINATION ${MEDCOUPLING_INSTALL_PYTHON}) + +INSTALL(FILES MEDLoaderDataForTest.py MEDLoaderTest1.py MEDLoaderTest2.py MEDLoaderTest3.py MEDLoaderTest123.py MEDLoaderTest4.py SauvLoaderTest.py MEDLoaderExamplesTest.py MEDLoaderCouplingTrainingSession.py CaseIO.py CaseReader.py CaseWriter.py VTKReader.py medutilities.py DESTINATION ${MEDCOUPLING_INSTALL_SCRIPT_SCRIPTS}) + INSTALL(FILES med2sauv PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MEDCOUPLING_INSTALL_BINS} ) INSTALL(FILES sauv2med PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MEDCOUPLING_INSTALL_BINS} ) INSTALL(FILES case2med PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MEDCOUPLING_INSTALL_BINS} ) diff --git a/src/MEDLoader/Swig/MEDLoaderSplitter.py b/src/MEDLoader/Swig/MEDLoaderSplitter.py index 62319a571..8fb3b1c7f 100644 --- a/src/MEDLoader/Swig/MEDLoaderSplitter.py +++ b/src/MEDLoader/Swig/MEDLoaderSplitter.py @@ -62,7 +62,7 @@ class MEDLoaderSplitter: pass def __splitMEDFileField1TS(self,mm,f1ts,idsLst): - ret=[MEDFileField1TS() for i in xrange(len(idsLst))] + ret=[f1ts.__class__() for i in xrange(len(idsLst))] dico={ON_CELLS:self.__splitMEDFileField1TSCell, ON_NODES:self.__splitMEDFileField1TSNode, ON_GAUSS_PT:self.__splitMEDFileField1TSCell, @@ -82,7 +82,7 @@ class MEDLoaderSplitter: print "Field \"%s\" contains profiles ! Not supported yet ! This field will be ignored !"%(fmts.getName()) continue pass - ret1=[MEDFileFieldMultiTS() for i in xrange(len(idsLst))] + ret1=[fmts.__class__() for i in xrange(len(idsLst))] for f1ts in fmts: for fmtsPart,f1tsPart in zip(ret1,self.__splitMEDFileField1TS(mm,f1ts,idsLst)): fmtsPart.pushBackTimeStep(f1tsPart)