open file only once
This commit is contained in:
parent
c3a7a85f7a
commit
faa9e6aa6a
|
@ -1059,6 +1059,7 @@ class Result:
|
||||||
attributes = []
|
attributes = []
|
||||||
data_items = []
|
data_items = []
|
||||||
|
|
||||||
|
with h5py.File(self.fname,'r') as f:
|
||||||
for inc in self.visible['increments']:
|
for inc in self.visible['increments']:
|
||||||
|
|
||||||
grid=ET.SubElement(collection,'Grid')
|
grid=ET.SubElement(collection,'Grid')
|
||||||
|
@ -1084,8 +1085,6 @@ class Result:
|
||||||
'Dimensions': '3'}
|
'Dimensions': '3'}
|
||||||
delta.text="{} {} {}".format(*(self.size/self.cells))
|
delta.text="{} {} {}".format(*(self.size/self.cells))
|
||||||
|
|
||||||
|
|
||||||
with h5py.File(self.fname,'r') as f:
|
|
||||||
attributes.append(ET.SubElement(grid, 'Attribute'))
|
attributes.append(ET.SubElement(grid, 'Attribute'))
|
||||||
attributes[-1].attrib={'Name': 'u / m',
|
attributes[-1].attrib={'Name': 'u / m',
|
||||||
'Center': 'Node',
|
'Center': 'Node',
|
||||||
|
|
Loading…
Reference in New Issue