MantisBT - ParaView
View Issue Details
0012929ParaView(No Category)public2012-02-13 12:152012-10-29 17:04
Paul Edwards 
Sebastien Jourdain 
normalminorhave not tried
closedduplicate 
 
3.98.0 
TBD
incorrect functionality
0012929: Calculator gives incorrect results for multiblock datasets
The calculator gives incorrect results for multiblock unless the variables have the same index internally. This can be reproduced with the steps below:

1. Create a python source that outputs vtkUnstructuredGrid with the following script:
def add_scalar(ds, val):
                arr = vtk.vtkDoubleArray()
                arr.SetName("Scalar"+str(val))
                arr.SetNumberOfComponents(1)
                arr.SetNumberOfTuples(8)
                for i in range(8):
                                arr.SetTuple1(i, float(val))
                output.GetPointData().AddArray(arr)

output = self.GetOutput()
npts = 8
pts = vtk.vtkPoints()
pts.InsertNextPoint(-3.0, -1.0, -1.0)
pts.InsertNextPoint(-1.0, -1.0, -1.0)
pts.InsertNextPoint(-1.0, 1.0, -1.0)
pts.InsertNextPoint(-3.0, 1.0, -1.0)
pts.InsertNextPoint(-3.0, -1.0, 1.0)
pts.InsertNextPoint(-1.0, -1.0, 1.0)
pts.InsertNextPoint(-1.0, 1.0, 1.0)
pts.InsertNextPoint(-3.0, 1.0, 1.0)
output.SetPoints(pts)
output.Allocate(1,1)
ids = vtk.vtkIdList()
for i in range(npts):
    ids.InsertId(i,i)
add_scalar(output, 1)
add_scalar(output, 2)
output.InsertNextCell(vtk.VTK_HEXAHEDRON, ids)
2. Create a second python source that outputs vtkUnstructuredGrid with the following script (notice the change in order when adding the scalars):
def add_scalar(ds, val):
                arr = vtk.vtkDoubleArray()
                arr.SetName("Scalar"+str(val))
                arr.SetNumberOfComponents(1)
                arr.SetNumberOfTuples(8)
                for i in range(8):
                                arr.SetTuple1(i, float(val))
                output.GetPointData().AddArray(arr)

output = self.GetOutput()
npts = 8
pts = vtk.vtkPoints()
pts.InsertNextPoint(-3.0, -1.0, -1.0)
pts.InsertNextPoint(-1.0, -1.0, -1.0)
pts.InsertNextPoint(-1.0, 1.0, -1.0)
pts.InsertNextPoint(-3.0, 1.0, -1.0)
pts.InsertNextPoint(-3.0, -1.0, 1.0)
pts.InsertNextPoint(-1.0, -1.0, 1.0)
pts.InsertNextPoint(-1.0, 1.0, 1.0)
pts.InsertNextPoint(-3.0, 1.0, 1.0)
output.SetPoints(pts)
output.Allocate(1,1)
ids = vtk.vtkIdList()
for i in range(npts):
    ids.InsertId(i,i)
add_scalar(output, 2)
add_scalar(output, 1)
output.InsertNextCell(vtk.VTK_HEXAHEDRON, ids)
3. Group the two python sources together
4. Use the Calculator filter to pass through Scalar1
No tags attached.
duplicate of 0013088closed Sebastien Jourdain Calculator produce invalid results 
Issue History
2012-02-13 12:15Paul EdwardsNew Issue
2012-04-13 11:42Sebastien JourdainRelationship addedduplicate of 0013088
2012-04-23 10:18Utkarsh AyachitNote Added: 0028513
2012-04-23 10:18Utkarsh AyachitStatusbacklog => closed
2012-04-23 10:18Utkarsh AyachitAssigned To => Utkarsh Ayachit
2012-04-23 10:18Utkarsh AyachitResolutionopen => duplicate
2012-04-23 10:18Utkarsh AyachitFixed in Version => git-master
2012-04-23 10:19Utkarsh AyachitAssigned ToUtkarsh Ayachit => Sebastiennn Jourdain
2012-10-29 17:04Utkarsh AyachitFixed in Versiongit-master => 3.98.0

Notes
(0028513)
Utkarsh Ayachit   
2012-04-23 10:18   
Duplicate of BUG 0013088, and that one's already fixed in git-master.