correct names
This commit is contained in:
parent
4e9e55f3ac
commit
bc020a9580
|
@ -649,8 +649,8 @@ class Grid:
|
||||||
"""
|
"""
|
||||||
v = VTK.from_image_data(self.cells,self.size,self.origin)\
|
v = VTK.from_image_data(self.cells,self.size,self.origin)\
|
||||||
.add(self.material.flatten(order='F'),'material')
|
.add(self.material.flatten(order='F'),'material')
|
||||||
for label,field in self.fields.items():
|
for label,data in self.ic.items():
|
||||||
v = v.add(field.flatten(order='F'),label)
|
v = v.add(data.flatten(order='F'),label)
|
||||||
v.comments = self.comments
|
v.comments = self.comments
|
||||||
|
|
||||||
v.save(fname,parallel=False,compress=compress)
|
v.save(fname,parallel=False,compress=compress)
|
||||||
|
|
|
@ -88,10 +88,10 @@ class VTK:
|
||||||
@property
|
@property
|
||||||
def comments(self) -> List[str]:
|
def comments(self) -> List[str]:
|
||||||
"""Return the comments."""
|
"""Return the comments."""
|
||||||
fielddata = self.vtk_data.GetFieldData()
|
field_data = self.vtk_data.GetFieldData()
|
||||||
for a in range(fielddata.GetNumberOfArrays()):
|
for a in range(field_data.GetNumberOfArrays()):
|
||||||
if fielddata.GetArrayName(a) == 'comments':
|
if field_data.GetArrayName(a) == 'comments':
|
||||||
comments = fielddata.GetAbstractArray(a)
|
comments = field_data.GetAbstractArray(a)
|
||||||
return [comments.GetValue(i) for i in range(comments.GetNumberOfValues())]
|
return [comments.GetValue(i) for i in range(comments.GetNumberOfValues())]
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue