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
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
#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"