Skip to content

In vtkXMLWriter::WritePArray, add missing SetComponentName

Florian Maurin requested to merge florian360/vtk:master into master

This fix a bug, where in the XML writer, the components names are correctly handled in serial, but not in parallel. The root of the problem, is that in vtkXMLWriter.cxx, there are two functions:

  • vtkXMLWriter::WriteArrayHeader that is used to generate the vtu file. This function dumps the array name and the name of its components.
  • vtkXMLWriter::WritePArray that is used in parallel to generate the pvtu file. This function dumps the array name but not the name of its components. This is a bug, see for instance when you open the files attached in ParaView. See also the attached picture.

image parallel_after_fix_0.vtu

serial.vtu

parallel_after_fix.pvtu

parallel_before_fix_0.vtu

parallel_before_fix.pvtu

Merge request reports