View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012929ParaView(No Category)public2012-02-13 12:152012-10-29 17:04
ReporterPaul Edwards 
Assigned ToSebastien Jourdain 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.98.0 
Summary0012929: Calculator gives incorrect results for multiblock datasets
DescriptionThe 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
TagsNo tags attached.
ProjectTBD
Topic Name
Typeincorrect functionality
Attached Files

 Relationships
duplicate of 0013088closedSebastien Jourdain Calculator produce invalid results 

  Notes
(0028513)
Utkarsh Ayachit (administrator)
2012-04-23 10:18

Duplicate of BUG 0013088, and that one's already fixed in git-master.

 Issue History
Date Modified Username Field Change
2012-02-13 12:15 Paul Edwards New Issue
2012-04-13 11:42 Sebastien Jourdain Relationship added duplicate of 0013088
2012-04-23 10:18 Utkarsh Ayachit Note Added: 0028513
2012-04-23 10:18 Utkarsh Ayachit Status backlog => closed
2012-04-23 10:18 Utkarsh Ayachit Assigned To => Utkarsh Ayachit
2012-04-23 10:18 Utkarsh Ayachit Resolution open => duplicate
2012-04-23 10:18 Utkarsh Ayachit Fixed in Version => git-master
2012-04-23 10:19 Utkarsh Ayachit Assigned To Utkarsh Ayachit => Sebastiennn Jourdain
2012-10-29 17:04 Utkarsh Ayachit Fixed in Version git-master => 3.98.0


Copyright © 2000 - 2018 MantisBT Team