mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Keep outgoing datasets in a list until VTK file is written
This commit is contained in:
parent
782c241190
commit
f4bb731687
1 changed files with 2 additions and 0 deletions
|
|
@ -1722,6 +1722,7 @@ class UnstructuredMesh(MeshBase):
|
|||
grid.InsertNextCell(elem.GetCellType(), elem.GetPointIds())
|
||||
|
||||
# check that datasets are the correct size
|
||||
datasets_out = []
|
||||
if datasets is not None:
|
||||
for name, data in datasets.items():
|
||||
if data.shape != (self.dimension,):
|
||||
|
|
@ -1739,6 +1740,7 @@ class UnstructuredMesh(MeshBase):
|
|||
|
||||
# add data to the mesh
|
||||
for name, data in datasets.items():
|
||||
datasets_out.append(data)
|
||||
arr = vtk.vtkDoubleArray()
|
||||
arr.SetName(name)
|
||||
arr.SetNumberOfTuples(data.size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue