]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Merge remote-tracking branch 'origin/rnv/autoconf_macros' into V8_1_BR
authorrnv <rnv@opencascade.com>
Mon, 5 Sep 2016 13:35:39 +0000 (16:35 +0300)
committerrnv <rnv@opencascade.com>
Mon, 5 Sep 2016 13:35:39 +0000 (16:35 +0300)
src/MEDLoader/Swig/CaseReader.py
src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx

index 987869ebbd25967a1c4615d5e10eafadaedf29b7..d1dde8d4257d8bd3cc80fe51e83cb09f8962e46d 100644 (file)
@@ -215,6 +215,7 @@ class CaseReader(CaseIO):
             typ=fd.read(80).strip() ; pos=fd.tell()
             mcmeshes2=[]
             while pos!=end and typ!="part":
+                if typ[0]=='\0': pos+=1; continue
                 mctyp=self.dictMCTyp2[typ]
                 nbCellsOfType=np.memmap(fd,dtype='int32',mode='r',offset=int(pos),shape=(1,)).tolist()[0]
                 pos+=4
@@ -246,10 +247,11 @@ class CaseReader(CaseIO):
                     elt=fd.read(80) ; elt=elt.strip() ; typ=elt[:] ; pos+=80
                     pass
                 pass
-            coo=mcmeshes2[0].getCoords() ; name=mcmeshes2[0].getName()
-            for itmesh in mcmeshes2: itmesh.setCoords(coo)
-            m=MEDCouplingUMesh.MergeUMeshesOnSameCoords(mcmeshes2) ; m.setName(name)
-            mcmeshes.append(m)
+            if mcmeshes2:
+                coo=mcmeshes2[0].getCoords() ; name=mcmeshes2[0].getName()
+                for itmesh in mcmeshes2: itmesh.setCoords(coo)
+                m=MEDCouplingUMesh.MergeUMeshesOnSameCoords(mcmeshes2) ; m.setName(name)
+                mcmeshes.append(m)
             pass
         return mcmeshes
         
index bfc7aa03d572d900c3895df369e9dd3e6bbf965e..a07b56200889347b4faab3da33fbe385c45798df 100644 (file)
 #include "MEDPARTITIONER_ParallelTopology.hxx"
 #include "MEDPARTITIONER_Utils.hxx"
 #include "MEDPARTITIONER_Graph.hxx"
-#include "MEDPARTITIONER_MetisGraph.hxx"
-#include "MEDPARTITIONER_ScotchGraph.hxx"
+#ifdef MED_ENABLE_METIS
+#  include "MEDPARTITIONER_MetisGraph.hxx"
+#endif
+#ifdef MED_ENABLE_SCOTCH
+#  include "MEDPARTITIONER_ScotchGraph.hxx"
+#endif
 #include "MEDPARTITIONER_MeshCollectionDriver.hxx"
 
 #include "MEDCouplingUMesh.hxx"