fixed leftover .add --> .set
This commit is contained in:
parent
648d17d381
commit
d18e36ecf0
|
@ -694,9 +694,9 @@ class Grid:
|
|||
|
||||
"""
|
||||
v = VTK.from_image_data(self.cells,self.size,self.origin)\
|
||||
.add('material',self.material.flatten(order='F'))
|
||||
.set('material',self.material.flatten(order='F'))
|
||||
for label,data in self.initial_conditions.items():
|
||||
v = v.add(label,data.flatten(order='F'))
|
||||
v = v.set(label,data.flatten(order='F'))
|
||||
v.comments = self.comments
|
||||
|
||||
v.save(fname,parallel=False,compress=compress)
|
||||
|
@ -745,7 +745,7 @@ class Grid:
|
|||
|
||||
"""
|
||||
VTK.from_image_data(self.cells,self.size,self.origin) \
|
||||
.add('material',self.material.flatten('F'),) \
|
||||
.set('material',self.material.flatten('F'),) \
|
||||
.show('material',colormap)
|
||||
|
||||
|
||||
|
|
|
@ -1627,7 +1627,7 @@ class Result:
|
|||
for inc in util.show_progress(self.visible['increments']):
|
||||
|
||||
u = _read(f['/'.join([inc,'geometry','u_n' if mode.lower() == 'cell' else 'u_p'])])
|
||||
v = v.add('u',u)
|
||||
v = v.set('u',u)
|
||||
|
||||
for ty in ['phase','homogenization']:
|
||||
for field in self.visible['fields']:
|
||||
|
@ -1654,7 +1654,7 @@ class Result:
|
|||
outs[out][at_cell_ho[label]] = data[in_data_ho[label]]
|
||||
|
||||
for label,dataset in outs.items():
|
||||
v = v.add(' / '.join(['/'.join([ty,field,label]),dataset.dtype.metadata['unit']]),dataset)
|
||||
v = v.set(' / '.join(['/'.join([ty,field,label]),dataset.dtype.metadata['unit']]),dataset)
|
||||
|
||||
v.save(f'{self.fname.stem}_inc{inc[10:].zfill(N_digits)}',parallel=parallel)
|
||||
|
||||
|
|
Loading…
Reference in New Issue