increased scanBuffSize for new singlefile velocityfields

This commit is contained in:
Michael Krayer 2020-12-30 22:44:20 +01:00
parent fcca37ad93
commit dc8c9d381a
1 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ class UCF:
# Scan through file to get the basic structure (steps/sets)
self.__timeStep = np.zeros(self.__scanBuffSize,dtype=np.float64)
self.__posStep = np.zeros(self.__scanBuffSize,dtype=np.int32)
self.__posStep = np.zeros(self.__scanBuffSize,dtype=np.int64)
self.__numSetPerStep = np.zeros(self.__scanBuffSize,dtype=np.int32)
istep = 0;
while self.__fileID.tell()<self.FileSize:
@ -350,7 +350,7 @@ class UCF:
print("%d,%d,%f,%d" % (currentMagic,self.__currentStepSize,self.__currentStepTime,self.__currentStepNumSet),file=sys.stderr)
# Check if magic is correct
if currentMagic!=self.__magicStep:
raise ValueError("Magic mismatch: invalid step header. %d" & currentMagic);
raise ValueError("Magic mismatch: invalid step header. %d" % currentMagic);
def __readHeaderSet(self):
# Read and parse
@ -425,7 +425,7 @@ class UCF:
self.__factorTypeIDKind = 10;
self.__typeIDmatlabField = 1999;
self.__typeIDmatlabParticle = 2999;
self.__scanBuffSize = 4096;
self.__scanBuffSize = 131072;
def __resetPublicProperties(self):
self.File = '' # file name
self.Type = '' # file type