Skip to content

Draft: Fix io xml htg reader v2

Fix a reading fault on vector fields in IO XML HyperTreeGrid Reader, version 2.

The ReadArrayValues ​​method reads the values ​​of an array based on the offsets on the values, with the caller taking into account the number of components specific to each array (which was not done here, hence the bug).

Instead of modifying the call to this method, a new ReadArrayTuples method will be called. It automatically takes into account the number of components in the array in order to be called elsewhere (pooling).

  • add ReadArrayTuples in IO/XML/vtkXMLReader
  • use ReadArrayTuples in IO/XML/vtkXMLHyperTreeGridReader.cxx

@charles.gueunet @mwestphal

I think we could gain readability by replacing the other calls to ReadArrayValues ​​by ReadArrayTuples (be careful to remove the caller's consideration of the number of line components 644 and 851)

Edited by Jacques-Bernard Lekien

Merge request reports