• Tomáš Karabela's avatar
    Fix vtkEnSightGoldBinaryReader bug with missing variables · fc5c9d91
    Tomáš Karabela authored
    This commit fixes a subtle bug in vtkEnSightGoldBinaryReader which can
    cause missing variables in resulting vtkMultiBlockDataSet. To be more
    precise, prior to this commit it sometimes happened that an empty part
    in EnSight Gold binary file caused vtkEnSightGoldBinaryReader to stop
    reading given variable file, omitting the variable in subsequent parts.
    
    Per EnSight 10.2 User Manual
    (see http://www3.ensight.com/EnSight10_Docs/UserManual.pdf):
    "If the geometry of given part is empty, nothing for that part needs
    to be in the variable file". However, it is also possible to include
    the part in the variable file, with empty list of variable values.
    
    vtkEnSightGoldBinaryReader actually supported that before this commit,
    however it stopped reading the file if "coordinates" or "block" line
    was included after part number of the empty part. This concerns only
    "per node" variables.
    
    A simple test case is included, which was tested in EnSight 10.2.0(c)
    both interactively and using the ens_checker102 tool. The case has four
    parts, the two middle parts are empty. EnSight correctly loads variables
    for the first and the last part, while VTK has missing point variables
    in the last part, which is fixed by this commit.
    fc5c9d91