paraview 3.8.0 cannot read vtu file with small values

Asked by Chris Richardson on 2010-07-14

I am having a problem reading output from dolfin with paraview... I realise this might not be a problem with dolfin, but a problem with paraview, but there seems to be a compatibility issue: maybe you can suggest a solution? Or I can complain to KitWare...

Here are the symptoms:

Function contains all zeros: will read with Paraview 3.4.0 and Paraview 3.8.0
Function contains small values: will only read with Paraview 3.4.0 - Paraview 3.8.0 complains:

ERROR: In /home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaView/VTK/IO/vtkXMLDataReader.cxx, line 508
vtkXMLUnstructuredGridReader (0x2cfa7a0): Cannot read point data array "U" from PointData in piece 0. The data array in the element may be too short.

ERROR: In /home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaView/VTK/IO/vtkXMLDataReader.cxx, line 508
vtkXMLUnstructuredGridReader (0x2b7dc50): Cannot read point data array "U" from PointData in piece 0. The data array in the element may be too short.

e.g. this will generate output which is unreadable:

m=UnitSquare(10,10)
Q=FunctionSpace(m,"CG",1)
R=Function(Q)

pvd2=File("R2.pvd")
small=Constant(1.234e-80)
R.interpolate(small)

pvd2 << R

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Anders Logg
Solved:
2010-07-14
Last query:
2010-07-14
Last reply:
2010-07-14
Best Anders Logg (logg) said : #1

On Wed, Jul 14, 2010 at 09:58:27AM -0000, Chris Richardson wrote:
> New question #117708 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/117708
>
>
> I am having a problem reading output from dolfin with paraview... I realise this might not be a problem with dolfin, but a problem with paraview, but there seems to be a compatibility issue: maybe you can suggest a solution? Or I can complain to KitWare...
>
> Here are the symptoms:
>
> Function contains all zeros: will read with Paraview 3.4.0 and Paraview 3.8.0
> Function contains small values: will only read with Paraview 3.4.0 - Paraview 3.8.0 complains:
>
> ERROR: In /home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaView/VTK/IO/vtkXMLDataReader.cxx, line 508
> vtkXMLUnstructuredGridReader (0x2cfa7a0): Cannot read point data array "U" from PointData in piece 0. The data array in the element may be too short.
>
>
> ERROR: In /home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaView/VTK/IO/vtkXMLDataReader.cxx, line 508
> vtkXMLUnstructuredGridReader (0x2b7dc50): Cannot read point data array "U" from PointData in piece 0. The data array in the element may be too short.
>
> e.g. this will generate output which is unreadable:
>
> m=UnitSquare(10,10)
> Q=FunctionSpace(m,"CG",1)
> R=Function(Q)
>
> pvd2=File("R2.pvd")
> small=Constant(1.234e-80)
> R.interpolate(small)
>
> pvd2 << R

Which version of DOLFIN are you running? We recently modified the VTK
output so that values smaller than DOLFIN_EPS are automatically
zeroed.

--
Anders

Chris Richardson (chris-bpi) said : #2

Thanks Anders Logg, that solved my question.