]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Last bug, when reading a node field OK_040613
authorageay <ageay>
Tue, 4 Jun 2013 12:39:07 +0000 (12:39 +0000)
committerageay <ageay>
Tue, 4 Jun 2013 12:39:07 +0000 (12:39 +0000)
src/MEDLoader/Swig/CaseReader.py

index 2a67d420e709c39b47379074ef1d5cb17e31af8c..87d2fbcce509e9a6f7d7ab9b2f37fa94c6690dab 100644 (file)
@@ -195,7 +195,11 @@ class CaseReader(CaseIO):
             st=fd.read(80).strip() ; pos=fd.tell()
             offset=0
             while pos!=end and st!="part":
-                nbOfValsOfTyp=mcmeshes[meshId].getNumberOfCellsWithType(self.dictMCTyp2[st])
+                if st!="coordinates":
+                    nbOfValsOfTyp=mcmeshes[meshId].getNumberOfCellsWithType(self.dictMCTyp2[st])
+                else:
+                    nbOfValsOfTyp=nbOfValues
+                    pass
                 vals=np.memmap(fd,dtype='float32',mode='r',offset=int(pos),shape=(nbOfValsOfTyp,nbCompo))#np.memmap(fd,dtype='int32',mode='r',offset=159,shape=(1))
                 vals2[offset:offset+nbOfValsOfTyp]=DataArrayDouble(np.array(vals,dtype='float64')).fromNoInterlace()
                 pos+=nbOfValsOfTyp*nbCompo*4 ; fd.seek(pos)