pvd files unsupported with ghost cells when running parallel

Issue #421 resolved
Ettie Unwin created an issue

When using ghost cells in a mesh and running in parallel, it is not possible to visualise data stored in .pvd files using paraview.

The following error is given when trying to open the file in paraview:

ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/VTK/IO/XML/vtkXMLDataReader.cxx, line 434
vtkXMLUnstructuredGridReader (0x7ff1c4b0d0b0): Cannot read point data array "u" from PointData in piece 0.  The data array in the element may be too short.

The following code should enable the problem to be recreated.

from dolfin import *

parameters["ghost_mode"] = "shared_facet"

# Create mesh and define function space
mesh = UnitSquareMesh(32, 32)
V = FunctionSpace(mesh, "Lagrange", 1)

u = project(10,V)

# Save solution in VTK format
file = File("file.pvd")
file << u

# Plot solution
plot(u, interactive=True)

Comments (4)

  1. Log in to comment