View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015832 | ParaView | (No Category) | public | 2015-11-11 18:49 | 2016-08-12 09:59 | ||||
Reporter | Nico Schlömer | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015832: vtkExodusIIWriter: vtk int array converted to double | ||||||||
Description | Writing an Int array to an exodus file, the data is incorrectly stored as double in the file. An MWE ``` import numpy import vtk from vtk.util import numpy_support points = [ [0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [1.0, 1.0, 0.0], [0.0, 1.0, 0.0] ] mesh = vtk.vtkUnstructuredGrid() # set points vtk_points = vtk.vtkPoints() # Not using a deep copy here results in a segfault. vtk_array = vtk.util.numpy_support.numpy_to_vtk(points) vtk_points.SetData(vtk_array) mesh.SetPoints(vtk_points) # TODO use numpy_support here, avoid the copying c = numpy.array([ 3, 0, 1, 2, 3, 0, 2, 3 ], dtype=int) a = vtk.util.numpy_support.numpy_to_vtkIdTypeArray(c) cell_array = vtk.vtkCellArray() cell_array.SetCells(2, a) mesh.SetCells(vtk.VTK_TRIANGLE, cell_array) # add int point data X = numpy.array([7, 8, 3, -2], dtype=int) array = vtk.util.numpy_support.numpy_to_vtk(X) array.SetName('X') pd = mesh.GetPointData() pd.AddArray(array) writer = vtk.vtkExodusIIWriter() writer.SetFileName('test.e') writer.SetInput(mesh) writer.Write() ``` The array `X` is stored as `double` in `test.e`. | ||||||||
Tags | No tags attached. | ||||||||
Project | TBD | ||||||||
Topic Name | |||||||||
Type | incorrect functionality | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0038930) Kitware Robot (administrator) 2016-08-12 09:59 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current ParaView Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-11-11 18:49 | Nico Schlömer | New Issue | |
2016-08-12 09:59 | Kitware Robot | Note Added: 0038930 | |
2016-08-12 09:59 | Kitware Robot | Status | backlog => closed |
2016-08-12 09:59 | Kitware Robot | Resolution | open => moved |
2016-08-12 09:59 | Kitware Robot | Assigned To | => Kitware Robot |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |