paraview error: "Cannot read point array from Points in piece 0. The data array in the element may be too short."


60
views
0
26 days ago by
Hello everyone,
I interpolate a simple expression on a function space, with no error from Fenics, but then when i try to open the file with paraview, i got the following error:
"Cannot read point array from Points in piece 0. The data array in the element may be too short."
I opened the .vtu file and read (i have replaced the many numbers with ...):

<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid"  version="0.1"  >
<UnstructuredGrid>
<Piece  NumberOfPoints="2032" NumberOfCells="8077">
<Points>
<DataArray  type="Float64"  NumberOfComponents="3"  format="ascii">7.96888456818071 4.251131061919073 ...  </DataArray>
</Points>
<Cells>
<DataArray  type="UInt32"  Name="connectivity"  format="ascii">159 185 ...   </DataArray>
<DataArray  type="UInt32"  Name="offsets"  format="ascii">4 8 ... </DataArray>
<DataArray  type="UInt8"  Name="types"  format="ascii">10 10...  </DataArray>
</Cells>
<PointData  Scalars="f_200"> 
<DataArray  type="Float64"  Name="f_200"  format="ascii">7.9688845681807097e+00  7.9950902627605220e+00... </DataArray> 
</PointData> 
</Piece>
</UnstructuredGrid>
</VTKFile>​

Even though FEniCS didnt show an error, i am wondering if the interpolated function is really correct because of the Paraview error.

Below is a minimum code (FEniCS 2017.2.0):


# Any 3D mesh
V = FunctionSpace(mesh, 'CG', 2) 
exp_ = Expression('x[0]', degree = 2) # I actually want a function of x[0] in my code
Pv = interpolate(exp_ , V) # Note that I tried project(exp_ , V) and i got the same error
file = File('test.pvd')
file << Pv # Error when file opened in Paraview
​

Before, i was using x = SpatialCoordinate(mesh), then project(x[0],V), but this works only for a degree 1 not 2.

Any thoughts on my issue? Thanks.

EDIT: well, actually i found out my Paraview error appears very randomly (it is not related with the expression). Thus, i have changed the post title to make it more generic. Has anyone else seen this Paraview error before with FEniCS?
I join the pvd files that give me an error, so you can test them as well: File attached: Pvd_files.rar (136.24 KB)
Community: FEniCS Project
Please login to add an answer/comment or follow this question.

Similar posts:
Search »