vtkOpenFOAMReader class does not support read of solution files written in ASCII format
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
The vtkOpenFOAMReader class supports only binary reading of the OpenFOAM solution files if the simulation was run in double precision. If this might be relevant for most cases, this becomes a real pain for single precision simulations, where the binary format used for storing the solution is different from the double precision case. There is unfortunately no simple way to differentiate at the time being single precision binary dumps from double precision ones.
In order to avoid to convert twice the binary dump from single precision binary to ASCII, and then from ASCII to double precision binary, it is much easier to convert the data to ASCII once and for all and let the vtkOpenFOAMReader class do the rest. For this purpose, we have gone through this class and found out that it does not fully support ASCII solution files especially when the field size is 0. This happens for instance in parallel simulation for which do all existing boundaries are declared in all processor directories, but if a processor does not have the boundary lying on its domain, the corresponding boundary patch size and all associated fields are of length 0. This is valid for all ParaView version from v3.8.1 to v3.10.1.
Please find a working patch to the file Paraview-3.10.1/VTK/IO/vtkOpenFOAMReader.cxx
This patch has been tested in parallel on Linux.