In vtkXMLWriter::WritePArray, add missing SetComponentName
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.