mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 14:35:27 -04:00
Write particle states as separate lines in track VTK files. (#3628)
This commit is contained in:
parent
8cd3911cbe
commit
5c2bfe771e
1 changed files with 9 additions and 9 deletions
|
|
@ -296,16 +296,16 @@ class Tracks(list):
|
|||
for state in pt.states:
|
||||
points.InsertNextPoint(state['r'])
|
||||
|
||||
# Create VTK line and assign points to line.
|
||||
n = pt.states.size
|
||||
line = vtk.vtkPolyLine()
|
||||
line.GetPointIds().SetNumberOfIds(n)
|
||||
for i in range(n):
|
||||
line.GetPointIds().SetId(i, point_offset + i)
|
||||
point_offset += n
|
||||
# Create VTK line and assign points to line.
|
||||
n = pt.states.size
|
||||
line = vtk.vtkPolyLine()
|
||||
line.GetPointIds().SetNumberOfIds(n)
|
||||
for i in range(n):
|
||||
line.GetPointIds().SetId(i, point_offset + i)
|
||||
point_offset += n
|
||||
|
||||
# Add line to cell array
|
||||
cells.InsertNextCell(line)
|
||||
# Add line to cell array
|
||||
cells.InsertNextCell(line)
|
||||
|
||||
data = vtk.vtkPolyData()
|
||||
data.SetPoints(points)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue