Hello Paraviewers,

I want to get the difference of all the cell data, similar to what was done
here

http://paraview.markmail.org/search/?q=difference#query:difference+page:1+mid:lc6a4ss2j5hi37ps+state:results

However, how do I make a writer that can accept the appended data? I tried
to create the writer

writer = CreateWriter(path+'Difference.e', reader[0])
writer.CellData.append( reader[0].CellData['x'] - reader[1].CellData['x'] ,
'x')


and got the error

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Program Files\ParaView
5.2.0-Qt4-OpenGL2-Windows-64bit\bin\lib\site-packages\paraview\servermanager.py",
line 1595, in __getattr__
    array = self.GetArray(name)
  File "C:\Program Files\ParaView
5.2.0-Qt4-OpenGL2-Windows-64bit\bin\lib\site-packages\paraview\servermanager.py",
line 1531, in GetArray
    if not self.GetFieldData().GetArrayInformation(idx):
  File "C:\Program Files\ParaView
5.2.0-Qt4-OpenGL2-Windows-64bit\bin\lib\site-packages\paraview\servermanager.py",
line 1520, in GetFieldData
    return getattr(self.Proxy.GetDataInformation(self.OutputPort),
"Get%sInformation" % self.FieldData)()
AttributeError: 'NoneType' object has no attribute 'GetCellDataInformation'


Then, I also tried to just copy the reader

writer = reader[0]
writer.CellData.append( reader[0].CellData['x'] - reader[1].CellData['x'] ,
'x')


and got the error

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Program Files\ParaView
5.2.0-Qt4-OpenGL2-Windows-64bit\bin\lib\site-packages\paraview\servermanager.py",
line 1597, in __getattr__
    raise AttributeError("class has no attribute %s" % name)
AttributeError: class has no attribute append


Any advice?

Regards,

John R. Haase
[email protected]
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to